The GitHub repository link: markdown-blog.
- This file can be used as a template for a blog post.
- The first 8 lines are metadata. The
idis required, and the others can be omitted.
Key 'id'
idis required. Post will not be created on the blog without anid.- For an
idvalue, only upper and lower case letters, numbers, and_are valid.-will be replaced by_. - If
idcontains invalid characters, the post will not be created. idshould be unique. If multiple posts have the sameid, only one post will be displayed on the blog.- You can name the Markdown file anything you want. The file name doesn't matter because we mainly use
idto identify a post.
Key 'permalink'
When 'permalink' is empty, '/', or invalid
- If the
permalinkvalue is empty,/, or invalid, we will automatically generate apermalinkbased on the value oftitle. - For example, if the title is
This is an Example Post, the corresponding permalink will bethis-is-an-example-post. Spaces are replaced with-, illegal characters will be deleted, and uppercase letters are converted to lowercase letters.
You can modify the 'permalink' at any time without worrying about SEO weight of the post being reduced.
- That's because we append a
-and theidto the end of each post link. So for this post, the real URL would be like https://your-domain.com/blog/the-readme-of-markdown-blog-repository-README. - Visiting a stale URL will be redirected to the fresh URL with status
301.
Key 'thumbnail'
- Files in the
jpg jpeg gif pngformat in the /images directory will be synchronized to the/public/imagesdirectory on the blog server. - At the same time, the blog system will automatically create a thumbnail for each image. The naming rule is to add
_thumbafter the original image name, such as the thumbnail ofimage_name.jpgisimage_name_thumb.jpg. - To display the automatically generated thumbnail in your blog post, you can use
thumbnail: image_name.jpg. In fact, the image used in the blog is/images/image_name_thumb.jpg.
Categories
- Here,
categoriesare directories, and they are equivalent.postsare placed in directories in the form of markdown files. - No matter you name the directory
ruby_on_rails,Ruby_on_Rails,ruby-on-rails,Ruby-on-Rails,Ruby on Rails, orRuby On rails, from the blog's point of view, they are the samecategory. The category's URL path isruby-on-rails, and the category's blog display name isRuby On Rails. - If a rename of directory causes the URL path to be changed, the original URL path will be inaccessible, and the new URL path will not inherit the SEO weight of the original URL path. To avoid this, we provide a URL 301 redirect function for directories in the
/adminbackend.
Files
Any file format in the /files directory will be synchronized to the /public/files directory on the blog server and can be referenced and downloaded in the blog.
For referencing a file, it is completely Markdown syntax, e.g., empty example PDF.
How to add pictures to your posts?
Remember to put the images in the /images directory. The blog cannot recognize other directories as image directory!
For referencing an image, it is completely Markdown syntax, e.g.,

A Little Penguin
What are the best practices for using markdown?
Please read Markdown Guide .