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
{{ message }}
Repository navigation
Commit 46fc242
Browse filesBrowse the repository at this point in the historyBrowse files
- docs: describe that post nav replaces VitePress's previous/next links, how `prev`/`next` and `postNav: false` change that, and the unlisted-post exception
Copy file name to clipboardExpand all lines: docs/plugins/blog/index.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ title: Blog
16
16
-**[The Scopes Demo](/plugins/blog/demo/)** is a small main blog with a [section blog](/plugins/blog/demo/team/) inside it, and example posts that show which blog lists which post. It is limited to its own folder, so the examples stay off the real blog.
17
17
-**[The Browse Demo](/plugins/blog/browse/)** is a section blog of example posts in three categories over two years, for trying the browse panel: filter by category, keyword, year and month, combine them, and open a long row with "+N more".
18
18
19
-
Open any post to see its byline under the title, and links to the newer and older posts at the end.
19
+
Open any post to see its byline under the title, and links to the newer and older posts in its blog at the end, in place of VitePress's previous / next links.
20
20
21
21
## Why this plugin
22
22
@@ -141,7 +141,7 @@ blog:
141
141
|`draft`|`false`| Left out of lists and feeds. To leave drafts out of the build and the menus too, see [Drafts](#drafts). |
142
142
|`byline`| the `byline` option |`false` hides this post's byline. |
143
143
|`cover`| the `cover` option |`true` shows this post's image under its byline. |
144
-
|`postNav`| the `postNav` option |`false` hides this post's newer / older links. |
144
+
|`postNav`| the `postNav` option |`false` hides this post's newer / older links, and VitePress's previous / next links come back. See [Newer and older links](#newer-and-older-links).|
145
145
146
146
Title, description, date, author, image and tags can also be written at the top level of the frontmatter, as other blog tools expect. A value under `blog` wins.
147
147
@@ -373,7 +373,16 @@ docs/
373
373
notes.md blog: true no section blog covers it
374
374
```
375
375
376
-
A post's newer and older links stay within its own blog: the deepest section blog that lists it, otherwise the main blog.
376
+
### Newer and older links
377
+
378
+
A post's newer and older links stay within its own blog: the deepest section blog that lists it, otherwise the main blog. They are in date order, the order readers see on the blog page.
379
+
380
+
They take the place of VitePress's previous / next links at the foot of the page, which follow the sidebar instead, so a post has one set of links, not two that disagree. To change that for one post:
381
+
382
+
- **`prev` or `next` in its frontmatter** still sets VitePress's link, as on any page, and it shows beside the newer / older links.
383
+
- **`postNav: false`** hides the newer / older links, and VitePress's previous / next come back.
384
+
385
+
A post that no blog lists keeps VitePress's links, since it has no blog to link within.
377
386
378
387
### When a section blog helps
379
388
@@ -411,7 +420,7 @@ A post image given as a relative path is also copied to `blog-images/` under a n
411
420
| `wordsPerMinute` | `200` | For "5 min read". `0` hides reading time. |
412
421
| `byline` | `true` | Author, date and tags under each post's title. |
413
422
| `cover` | `false` | Each post's image under its byline. |
414
-
| `postNav` | `true` | Newer and older post links at the end of each post. |
423
+
| `postNav` | `true` | Newer and older post links at the end of each post, in place of VitePress's previous / next links. |
415
424
| `drafts` | `false` | List drafts, marked. This site passes `process.env.NODE_ENV !== 'production'`: dev only. |
416
425
| `stripTags` | `true` | Remove [Markdown Tags](/plugins/markdown-tags/) syntax from titles and summaries. |
0 commit comments