The php package manager composer is required for installing.
composer create-project forehalo/materialize-blog blog
It will automatically install laravel and other dependencies for you.
Or you can install from this git repository manually
git clone https://github.com/forehalo/materialize-blog.git blog
cd blog && composer install
cp .env.example .env
php artisan key:generate
Ensure you have finish all the steps mentioned in laravel docs.
Next step, migrate tables and seed fakers
php artisan migrate
php artisan db:seed
The db:seed command will seed admin and settings table. If you want to pre-generate some mock data, run again with option --class=BlogSeeder
Now you can login dashboard at /dashboard with name admin or email admin@example.com, password admin.
Images
Maybe you want to store all images to local, it gives you an simple way.
Create an symbolic link public/storage target storage/app/publicfolder.
ln -s /path/to/storage/app/public/ public/storage
So now, you can upload images and get it with url example.com/storage/images/image.jpg. All images stored in storage/app/public/images folder.
Pages
Materialize-blog also provide a way to publish pages. What you need to do is just writing a markdown file and store it under storage/pages folder. Then, you can access it by url https://example.com/pages/{name}, name is the markdown file name without extension .md. There is an existent page named about. Try it out.
Custom
All front-end assets has been compiled so you could directly use them without compiling manually.
But if you don't like the default theme, hm... OK, install front-end environment and DIY.
yarn install // or "npm install"
yarn is another package manager like npm, read more.
请发表评论