This is a static file Blog written in Laravel. It's driven by markdown files (no database required). The blog will feature things like syntax highlighting, post tagging and pagination. Plus, it'll render in record time.
You can quickly create new posts since there's no need for an admin panel.
-
Clone this repository:
git clone git@github.com:Aczeko/laravel-static-file-blog.git
-
Navigate into the directory:
cd yourproject -
Install dependencies:
npm install composer install
-
Duplicate the .env.example file and save it as .env
- here you can give your blog a name at APP_NAME=""
APP_NAME="Your Blog's Name" -
Generate a new Application Key:
php artisan key:generate
-
Run your build process with:
npm run dev
Now all your blog needs is a blog post, so here is how you can make them and where you should save them:
-
Open your project and go to
storage/app/posts/. You can save all your blog posts in here. -
The Markdown files have to follow this name convention:
yyyy-mm-dd.blog-post-name.md Example: 2024-05-30.markdown-introduction.md -
All your markdown files have to include a title, an author, a teaser and tags at the beginning of each file and it should be put into the structure shown below.
You can copy this, change it to match your blog post and use it for your Markdown files:
--- title: Blog Post Name author: Your Name teaser: This is a simple teaser for your blog post. It should give a brief overview and encourage readers to click through and read the full post. tags: [Tag1, Tag2] --- ## Put in your own Markdown syntax here...
