Static Site Generator

How-to: How to add a new blog post?

How to add a new blog post?

Step 1

Add a new json file in the source/pages/blog directory:

source
+--- pages
     +--- blog
          +--- my-first-blog-post.html.json

The file must contain all the data for the blog post:

{
  "content": "content/blog/my-first-blog-post.html",

  "meta_title": "My first blog post",
  "meta_description": "This is my first blog post",
  "title": "My first blog post",
  "date": "2032-12-10",
  "author": "John Doe",
  "intro": "This is my first blog post.",

  "tags": ["post", "sitemap"]
}

Step 2

Create the blog post content file:

source
+--- content
     +--- blog
          +--- my-first-blog-post.html

Write the HTML content of the new post:

<p>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>

Browse to http://127.0.0.1:1985/blog/my-first-blog-post.html

Next