📝 Blog Posts Settings
You only need to write your posts in Markdown and place them in the posts folder. SuzuBlog will automatically render your posts, and the filename will serve as the post's URL.
Each post must include Frontmatter, which is used to define essential metadata and display settings.
Frontmatter
🔖 What is Frontmatter?
Frontmatter is a metadata block at the top of a Markdown file, enclosed within triple dashes, for example:
---
title: Sample Post
date: 2024-12-08
author: ZL Asica # Author (optional)
thumbnail: /images/example-thumbnail.jpg # Thumbnail (optional)
tags: # Tags (optional)
- SuzuBlog
- Frontmatter
categories: # Categories (optional)
- Tutorial
redirect: /example-redirect # Redirect URL (optional)
showComments: true # Show comments (optional)
showLicense: true # Show license statement (optional)
autoSlug: true # Automatically generate hierarchical paths (optional)
status: published # Post status (optional)
---🛠️ Explanation of Frontmatter Fields
Required Fields
title: The title of the post, which will be displayed in the page title and summary.date: The publication date of the post, formatted asYYYY-MM-DD. (If not set, the last modified date of the file will be used.)
Global Fields
author: The name of the post’s author. (If not set, the global author name will be used.)thumbnail: The thumbnail image path for the post, which can be a relative path or a full URL. (If not set, the default thumbnail specified inconfig.ymlwill be used.)
Optional Fields
WARNING
⚠️ The values for tags and categories must be arrays and are case-sensitive. It is recommended to maintain a consistent capitalization format to avoid duplicate categories.
tags: An array of tags for finer classification of the post. Example:yamltags: - SuzuBlog - Frontmatter - Next.jsTags are primarily used for indexing and filtering posts. You can add multiple tags, but it's recommended to keep them between 2-5 per post.
categories: An array of categories for higher-level content organization. Example:yamlcategories: - Tutorial - DevelopmentCategories typically represent broader topics, and each post should have 1-2 categories for better content organization.
redirect: Specifies a redirect URL for the post (e.g.,"/new-url"). If set, the post content will not be displayed, and visitors will be redirected to the specified URL.showComments: Determines whether to show the comment section. Default istrue.showLicense: Determines whether to display the post's copyright license. Default istrue.showThumbnail: Determines whether to display the post's thumbnail. Default istrue.autoSlug: Automatically generates hierarchical paths for the post. Default istrue. (If set tofalse, the post’s slug will be derived from the title inside the Markdown file instead.)status: Post visibility status. It controls whether a post page is generated, whether it shows up in listings, and whether crawlers/search engines are allowed to index it.Supported values (defaults to
publishedif omitted):published(default): Publicly published- ✅ The post page is generated
- ✅ Visible in the
/postslisting - ✅ Included in RSS / sitemap / LLMs.txt (and other site indexing entry points)
- ✅ Search engines may index it (
index)
unlisted: Publicly accessible, but not distributed (only visible if you know the URL)- ✅ The post page is generated (direct URL access works)
- ❌ Hidden from the
/postslisting - ❌ Excluded from RSS / sitemap / LLMs.txt
- 🚫 Not indexed by search engines by default (
noindex)
draft: Work-in-progress (not ready to publish)- 🚫 Not generated in production by default (visiting the URL returns 404)
- ❌ Hidden from the
/postslisting - ❌ Excluded from RSS / sitemap / LLMs.txt
- 🚫 Not indexed by search engines (
noindex) - 💡 To preview drafts in a production-like build locally, set
ALLOW_DRAFTS=truewhen building/running the site.
hidden: Strong hidden (internal use / never meant to be public)- 🚫 Not generated in production (visiting the URL returns 404)
- ❌ Hidden from the
/postslisting - ❌ Excluded from RSS / sitemap / LLMs.txt
- 🚫 Not indexed by search engines (
noindex) - 💡 For local debugging only, set
ALLOW_HIDDEN=trueto render hidden posts.TIP
statusonly controls page generation, discoverability, and indexing. It is not an access control system: if a page is publicly reachable (e.g.,publishedor an accessibleunlistedURL), anyone with the link can still view it.
✂️ Excerpt Truncation
Use <!--more--> to manually define where the post excerpt should be truncated, for example:
This is the beginning of the post.
<!--more-->
This is the remaining content of the post.- If
<!--more-->is not set, the system will automatically generate an excerpt that fits within the post card without overflowing.