You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-1Lines changed: 44 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,6 +201,16 @@ These commands toggle or cycle publishing-related fields in the file's YAML fron
201
201
|**Retina**| Toggles `retina: true` / `retina: false` in front matter |
202
202
|**Assets**| Toggles `assets: true` / `assets: false` in front matter |
203
203
204
+
#### Front Matter Presets *(files without existing front matter)*
205
+
206
+
These commands appear only when the current file has no YAML front matter block. They insert a complete front matter template with tabstop placeholders for easy editing.
207
+
208
+
| Command | Action |
209
+
|---|---|
210
+
|**Front Matter: Blog Post**| Inserts front matter for a blog post: `title`, `description`, `date` (today), `author`, `public: true`, `layout: blog`|
211
+
|**Front Matter: Docs Page**| Inserts front matter for a docs page: `title`, `description`, `public: true`, `layout: docs`, `order`|
212
+
|**Front Matter: Wiki Page**| Inserts front matter for a wiki page: `title`, `description`, `public: true`|
See [Publishing a Static Site](https://docs.asnotes.io/publishing-a-static-site.html) for full documenation
535
+
#### Blog index generation
536
+
537
+
When the site-wide layout is `blog` (or `blogIndex: true` is set in the config), the auto-generated index page uses a blog-aware layout:
538
+
539
+
1.**Recent posts** — the most recent posts (configurable via `recentCount`, default 3) shown as cards with title, date, author, description, and optional hero image
540
+
2.**Current year** — remaining posts for the current year as a compact date + title list
541
+
3.**Year archives** — links to auto-generated `archive-YYYY.html` pages for previous years
542
+
4.**Undated** — posts without a `date` in front matter are listed at the bottom
543
+
544
+
#### Front matter fields for publishing
545
+
546
+
| Field | Type | Description |
547
+
|---|---|---|
548
+
|`public`| boolean | Include page in published output |
549
+
|`title`| string | Page title (defaults to filename) |
550
+
|`description`| string | Meta description for SEO |
551
+
|`date`| string | Publication date (`YYYY-MM-DD`) — used for blog sorting, RSS, and sitemap |
552
+
|`author`| string | Post author — displayed in blog layout and RSS feed |
553
+
|`image`| string | Hero/thumbnail image path — displayed in blog layout and blog index cards |
0 commit comments