Article Configuration
Subtitle
Add a subtitle that renders alongside the post title in the article header, post lists, banner posts, series directory, page <title>, and RSS feed:
1 | subTitle: Advanced Guide |
Cover, Thumbnail & Share Image
Post image-related Front Matter options:
1 | cover: /img/cover.jpg |
Social share image (og:image) resolution priority: seriesInfo.cover > ogImage > cover > info.siteCardBg.
Cover Information
In the bottom-right corner of the cover image, you can add either author credits or location information (choose one):
- Author Information
1
2
3coverInfo:
author: freestocks
url: https://unsplash.com/photos/top-view-of-opened-magazine-near-up-of-coffee-VFs2fZEVkXo - Location Information
1
2
3coverInfo:
location: Macau · Municipal Affairs Bureau Building
url: https://maps.apple.com/place?address=Avenida%20de%20Almeida%20Ribeiro%20No.%20163,%20Macao%20SAR,%20China&coordinate=22.193346,113.539592&name=%E5%B8%82%E6%94%BF%E7%BD%B2&place-id=IC211FBD448B1E6C&map=explore
Hover Text
Sometimes you want to attach explanatory notes without cluttering prose with parentheses (like this). Add customComments to attach hoverable tooltip notes to specific occurrences of text:
For example, right here:
1 | customComments: |
Hiding Posts & SEO Control
Remove a post from the homepage or archives, or prevent search engine indexing (the post page is still generated and directly accessible by URL):
1 | hide: |
PhotoSwipe Plugin
Powered by https://photoswipe.com/.
- Global Enable: Add
photoswipe: trueto_config.linen.yml. - Page-level Disable: When globally enabled, add
photoswipe: falsein a post’s Front Matter to disable it on that page.
If a post contains no images or Live Photos, PhotoSwipe assets are not loaded.
Table of Contents (TOC)
Three TOC modes are supported in Front Matter:
- Hidden:
toc: false - Expanded by default:
tocType: flat - Auto collapse/expand: (Leave blank / omit)
Image Lazy Loading
Enable lazy loading explicitly in _config.linen.yml:
1 | lazyload: |
Run hexo clean (or npm run clean) after changing this setting so already-built posts are regenerated.
You can also override keepPlaceholder for a specific post in Front Matter:
1 | lazyload: |
To skip lazy loading for individual images (or <video> / <iframe> elements), use any of the following:
<img no-lazy src="https://abc.com/def.jpg" alt="def">
For $no-link, $aspect-ratio, $placeholder, assets-db/imgs/*.json, and HDR switching, see HDR & Advanced Image Settings.
Raw Markdown Toggle
Enable a “Switch to Raw Markdown Content” button in the post metadata bar so readers can inspect or copy the original Markdown source:
1 | appendRawMarkdown: true |
Post Age Notice
For time-sensitive tutorials or notes, enable ageWarning: true. When a post is older than 180 days, a notice banner is automatically shown at the top of the article:
1 | ageWarning: true |
Reading Time & Word Count
By default, estimated reading time, word count, and photo count are displayed together. To hide the word/photo count and show only the estimated reading time:
1 | readTime: |
Disabling Comments Per Post
When Gitalk is enabled globally, you can disable comments on a single post:
1 | comment: false |
Page-level <head> Injection
Inject extra stylesheets or scripts into <head> for a single post:
1 | heads: |
Language & Translations
Override the language for a single post (affecting date formatting, word counting, Gitalk language, and og:locale), and declare translated locales for the header language switcher (used together with siteOriginLocaleMap in _config.linen.yml):
1 | language: en |
Related Posts
Posts sharing 2 or more tags are automatically treated as related and shown at the bottom of the article. To hide related posts on a specific page:
1 | showRelated: false |
Copyright Notice
Display a copyright notice banner at the bottom of the article:
1 | copyright: true |
Donate QR Codes & Sponsor List
Configure donation QR codes in Front Matter:
1 | donates: |
To display a thank-you list of sponsors below the donate button, add sponsors (note: sponsors renders only when donates is also configured):
1 | sponsors: |
More Dedicated Guides
Additional Front Matter features have their own dedicated guides:
- Series & Travel Map (
series,mapPlace): see Series & Travel Map - LaTeX Math Formulas (
latex/math): see LaTeX Math Formulas - HDR Image Switching (
hdrSwitch,hdrAssetsPrefix): see HDR & Advanced Image Settings
1 | --- |