User-Guide

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
2
3
4
cover: /img/cover.jpg
coverPlaceholder: /img/cover-blur.jpg # Optional placeholder image for the cover (URL or Base64)
thumbnail: /img/thumb.jpg # Optional thumbnail for post lists/banners/related posts/travel cards (takes priority over cover)
ogImage: /img/og.jpg # Optional Open Graph og:image cover

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
    3
    coverInfo:
    author: freestocks
    url: https://unsplash.com/photos/top-view-of-opened-magazine-near-up-of-coffee-VFs2fZEVkXo
  • Location Information
    1
    2
    3
    coverInfo:
    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
2
3
4
customComments:
- text: For example, right here
index: 0
comment: Do you see the hover text?

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
2
3
4
hide:
recent: true # Exclude from homepage recent posts
archive: true # Exclude from archives and site post counts
seo: true # Output <meta name="robots" content="noindex, nofollow">

PhotoSwipe Plugin

Powered by https://photoswipe.com/.

  • Global Enable: Add photoswipe: true to _config.linen.yml.
  • Page-level Disable: When globally enabled, add photoswipe: false in 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:

_config.linen.yml
1
2
lazyload:
enable: true

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
2
lazyload:
keepPlaceholder: false

To skip lazy loading for individual images (or <video> / <iframe> elements), use any of the following:

  • ![no-lazy](https://abc.com/def.jpg)
  • ![This is an image $no-lazy](https://abc.com/def.jpg)
  • <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
2
readTime:
count: false

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
2
3
heads:
- <link rel="stylesheet" href="/css/custom-post.css">
- <script src="/js/custom-post.js" defer></script>

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
2
language: en
translations: ['zh-CN']

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

Display a copyright notice banner at the bottom of the article:

1
copyright: true

Configure donation QR codes in Front Matter:

1
2
3
donates:
- type: wechat
qrcode: /img/wx_qr.jpg

To display a thank-you list of sponsors below the donate button, add sponsors (note: sponsors renders only when donates is also configured):

1
2
3
4
sponsors:
- name: Me
amount: A cup of coffee
date: 2026-04-12

More Dedicated Guides

Additional Front Matter features have their own dedicated guides:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
---
title: Article Configuration
excerpt: Custom Front Matter options supported by Linen.
date: 2026-03-28 23:53
cover: /img/freestocks-VFs2fZEVkXo-unsplash.jpg
coverInfo:
author: freestocks
url: https://unsplash.com/photos/top-view-of-opened-magazine-near-up-of-coffee-VFs2fZEVkXo
series: User-Guide
tags: [Quick-Start, Configuration]
appendRawMarkdown: true
tocType: flat
customComments:
- text: For example, right here
index: 0
comment: Do you see the hover text?
translations: ['zh-CN']
copyright: true
donates:
- type: wechat
qrcode: /img/freestocks-VFs2fZEVkXo-unsplash.jpg
sponsors:
- name: Me
amount: A cup of coffee
date: 2026-04-12
---

## 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:

```yaml
subTitle: Advanced Guide
```

## Cover, Thumbnail & Share Image

Post image-related Front Matter options:

```yaml
cover: /img/cover.jpg
coverPlaceholder: /img/cover-blur.jpg # Optional placeholder image for the cover (URL or Base64)
thumbnail: /img/thumb.jpg # Optional thumbnail for post lists/banners/related posts/travel cards (takes priority over cover)
ogImage: /img/og.jpg # Optional Open Graph og:image cover
```

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
```yaml
coverInfo:
author: freestocks
url: https://unsplash.com/photos/top-view-of-opened-magazine-near-up-of-coffee-VFs2fZEVkXo
```
- Location Information
```yaml
coverInfo:
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:

```yaml
customComments:
- text: For example, right here
index: 0
comment: Do you see the hover text?
```

## 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):

```yaml
hide:
recent: true # Exclude from homepage recent posts
archive: true # Exclude from archives and site post counts
seo: true # Output <meta name="robots" content="noindex, nofollow">
```

## PhotoSwipe Plugin

Powered by [https://photoswipe.com/](https://photoswipe.com/).

- Global Enable: Add `photoswipe: true` to `_config.linen.yml`.
- Page-level Disable: When globally enabled, add `photoswipe: false` in 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: <small>(Leave blank / omit)</small>

## Image Lazy Loading

Enable lazy loading explicitly in `_config.linen.yml`:

```yaml _config.linen.yml
lazyload:
enable: true
```

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:

```yaml
lazyload:
keepPlaceholder: false
```

To skip lazy loading for individual images (or `<video>` / `<iframe>` elements), use any of the following:

- `![no-lazy](https://abc.com/def.jpg)`
- `![This is an image $no-lazy](https://abc.com/def.jpg)`
- `<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](/hexo-theme-linen-doc/advanced-images/).

## 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:

```yaml
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:

```yaml
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:

```yaml
readTime:
count: false
```

## Disabling Comments Per Post

When Gitalk is enabled globally, you can disable comments on a single post:

```yaml
comment: false
```

## Page-level `<head>` Injection

Inject extra stylesheets or scripts into `<head>` for a single post:

```yaml
heads:
- <link rel="stylesheet" href="/css/custom-post.css">
- <script src="/js/custom-post.js" defer></script>
```

## 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`):

```yaml
language: en
translations: ['zh-CN']
```

## 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:

```yaml
showRelated: false
```

## Copyright Notice

Display a copyright notice banner at the bottom of the article:

```yaml
copyright: true
```

## Donate QR Codes & Sponsor List

Configure donation QR codes in Front Matter:

```yaml
donates:
- type: wechat
qrcode: /img/wx_qr.jpg
```

To display a thank-you list of sponsors below the donate button, add `sponsors` (note: `sponsors` renders only when `donates` is also configured):

```yaml
sponsors:
- name: Me
amount: A cup of coffee
date: 2026-04-12
```

## More Dedicated Guides

Additional Front Matter features have their own dedicated guides:

- **Series & Travel Map** (`series`, `mapPlace`): see [Series & Travel Map](/hexo-theme-linen-doc/series-and-travel/)
- **LaTeX Math Formulas** (`latex` / `math`): see [LaTeX Math Formulas](/hexo-theme-linen-doc/latex/)
- **HDR Image Switching** (`hdrSwitch`, `hdrAssetsPrefix`): see [HDR & Advanced Image Settings](/hexo-theme-linen-doc/advanced-images/)

Buy Me a Coffee