This article is used to demonstrate and explain a mostcommon used Front Matter configuration. The meanings of each field are as follows:
- Title and Path
title: Page title, used for<title>and the main heading in the body.slug: Generates a friendly short link (together withpermalinksdetermines the final URL).canonical: Normalized link address. If content appears on multiple URLs, search engines use this as the primary one.aliases: List of historical old links; automatically generates 301 redirects to protect existing external links and indexing.
- Time Metadata
date: Publication date; used for sorting and structured data'sdatePublished.lastmod: Last update; used for structured datadateModifiedand SEO display.publishDate/expiryDate: Scheduled publication/expiry; suitable for content with time-sensitive validity.
- Categories and Tags
categories: Article categories; used for archiving and navigation.tags: Keyword tags; used for retrieval and related article recommendations.series: Series articles; provides series navigation when the theme supports it.
- Author and Media
author: Author information; the theme can be used to display or structured data.images: Prioritized as OpenGraph/Twitter share images; if unavailable, falls back to the site's favicon.
- Language and Internationalization
translationKey: Logical association key for multilingual articles; different filenames can also correctly identify each other.
- SEO Control
seo.robots: Controls crawling and indexing, such asindex,followornoindex,nofollow.- The site template will generate
<meta name="description">,canonical,og:*,twitter:*,hreflang, and JSON-LD structured data based on the above fields.
- Other
draft: Draft; should befalsein production environments.weight: Weight; same-day content can be sorted using weight.featured: Featured or recommended; the theme can use this field to enhance display priority.
The following is a sample of the body:
This is the body part of the complete Front Matter example. It is used to verify:
- Whether OG/Twitter share images are effective (prioritizes
images[0]). - Whether canonical links and
hreflangare generated correctly. - Whether JSON-LD's
datePublishedanddateModifiedmatchdate/lastmod.
Use the language switcher in the top-right corner to test the behavior of the multilingual translationKey (if an English version is provided).