Skip to content

Commit 9600943

Browse files
committed
feat(blog): add browse panel and rename sticky to pinned
- docs: add Blog 0.4/0.5 release posts, Browse Demo, and category/tag docs; rename sticky to pinned - content: recategorize existing posts under Releases - deps: bump @binarynoir/vitepress-blog to ^0.5.0
1 parent 189c938 commit 9600943

24 files changed

Lines changed: 416 additions & 111 deletions

‎docs/.vitepress/theme/index.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export default {
3333
// The filter field only appears on sidebars with 20 or more links: the Plugins
3434
// sidebar (nearly 40, with the demo pages) gets one; Guide, Apps and Reference don't.
3535
useSidebarAccordion({ filter: { minItems: 20 } });
36-
// Blog pages: one page of posts at a time (?page=2), and keyword filters (?tag=release).
36+
// Blog pages: one page of posts at a time (?page=2), and filters by category, keyword,
37+
// year and month (?category=plugins, ?tag=release, ?year=2026, ?month=2026-10).
3738
useBlog();
3839
},
3940
} satisfies Theme;

‎docs/blog/.sidebar‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# The overview stays first; sticky posts come next, then every other post, newest first.
1+
# The overview stays first; pinned posts come next, then every other post, newest first.
22
index.md:All posts
3-
.sort: blog.sticky desc, date desc
3+
.sort: blog.pinned desc, date desc
44
# Only the 10 newest posts are listed here; the blog page has them all.
55
.limit: 10
66
# In the navbar, Blog is one link to the blog page rather than a dropdown of every post.

‎docs/blog/blog-announcements.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: 'Blog 0.3: announcements'
33
blog:
44
date: 2026-10-20T20:15:00-04:00
55
summary: Blog 0.3.0 adds announcements, a one-line banner above the nav bar for the posts that matter most.
6-
tags: [release, blog]
7-
category: Plugins
6+
tags: [blog]
7+
category: Releases
88
announcement: 'New in the Blog plugin: announcement banners'
99
---
1010

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: 'Blog 0.4: browse by category and date'
3+
blog:
4+
date: 2026-10-20T21:30:00-04:00
5+
summary: Blog 0.4.0 adds a browse panel to every blog page, for filtering posts by category, keyword, year and month, and combining them.
6+
tags: [blog]
7+
category: Releases
8+
---
9+
10+
# Blog 0.4: browse by category and date
11+
12+
[Blog](/plugins/blog/) 0.4.0 lets readers find posts by what they are about and when they were written. Every blog page gets a browse panel above its posts, with a row of categories, a row of keywords and an archive of years and months. There is nothing to turn on: the rows fill in from the `category`, `tags` and `date` your posts already have.
13+
14+
The [Browse Demo](/plugins/blog/browse/) has example posts in three categories over two years, so every row has something to try.
15+
16+
- **Filters combine.** Pick a category, then a keyword, then a year: each one narrows the posts further, and each has its own URL, such as `?category=design&tag=ux` or `?month=2026-10`.
17+
- **Counts follow the view.** Every chip counts the posts it would show with the other filters kept, and dims when it would show none, so you know where a click leads before you make it.
18+
- **Years open into months.** Choose a year to see its months, then a month. Click it again to step back out to the year.
19+
- **Easy to undo.** The active filters show above the posts, each with its own ×, beside "Show all posts".
20+
- **Categories everywhere.** A post's category shows above its title on cards and in its byline, linked to its blog filtered by it.
21+
22+
Blog pages can also group posts by month (`groupBy: month`), and keep to some categories (`categories: [Engineering]`), as `::: blog-posts` blocks can.
23+
24+
One rename: `sticky` is now `pinned`, to match the Pinned badge it shows, and `stickyLimit` is now `pinLimit`. The old names still work. See [Browsing](/plugins/blog/#browsing-categories-keywords-and-dates) for the details.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: 'Blog 0.5: a browse panel for blogs of any size'
3+
blog:
4+
date: 2026-10-21T09:19:57-04:00
5+
summary: Blog 0.5.0 keeps the browse panel short on phones and on blogs with hundreds of keywords, and leaves out rows that can't narrow the posts.
6+
tags: [blog]
7+
category: Releases
8+
---
9+
10+
# Blog 0.5: a browse panel for blogs of any size
11+
12+
[Blog](/plugins/blog/) 0.5.0 reworks the browse panel that 0.4.0 added, so it stays out of the way of the posts, whether a blog has three keywords or three hundred.
13+
14+
- **One line per row on phones.** Each row scrolls sideways instead of wrapping, so on a phone the panel takes a few lines, not half the screen.
15+
- **The most used first.** Categories and keywords are ranked by how many posts use them. A row shows its first 8 categories or 12 keywords, then "+N more", which opens the full list alphabetically. A row of more than 30 gets a field to narrow it as you type.
16+
- **Only rows that help.** A row that can't narrow the posts is left out. [This blog](/blog/) shows only its keywords now: every post so far is a release, so a Releases chip would choose nothing.
17+
- **Lighter.** The panel is a flat toolbar instead of a card, with the "Subscribe" link at the end of its first row, and chips are easier to tap on touch screens.
18+
19+
The [Browse Demo](/plugins/blog/browse/) sets `tagLimit: 5`, so you can open "+3 more" there. New settings: `categoryLimit`, `tagLimit` and `tagMinCount`. See [Browsing](/plugins/blog/#browsing-categories-keywords-and-dates) for the details.

‎docs/blog/glossary-exact-case-terms.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: 'Glossary Tooltips 0.6: exact-case terms'
33
blog:
44
date: 2026-10-16T09:46:20-04:00
55
summary: markdown-it-glossary 0.6.0 lets a single term match in exact case, or in any case, whatever the rest of the site does.
6-
tags: [release, glossary]
7-
category: Plugins
6+
tags: [glossary]
7+
category: Releases
88
---
99

1010
# Glossary Tooltips 0.6: exact-case terms

‎docs/blog/introducing-the-blog-plugin.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ blog:
88
imageAlt: The BinaryNoir logo
99
# A wide logo, not a photo: show all of it rather than cropping it to fill the card.
1010
imageFit: contain
11-
tags: [release, vitepress]
12-
category: Plugins
13-
sticky: true
11+
tags: [blog]
12+
category: Releases
13+
pinned: true
1414
---
1515

1616
# Introducing the Blog plugin

‎docs/blog/sidebar-accordion-filter.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: 'Sidebar Accordion 0.3: filter long sidebars'
33
blog:
44
date: 2026-10-16T13:27:54-04:00
55
summary: Sidebar Accordion 0.3.0 adds a filter field that narrows a long sidebar to the pages that match.
6-
tags: [release, sidebar-accordion]
7-
category: Plugins
6+
tags: [sidebar-accordion]
7+
category: Releases
88
---
99

1010
# Sidebar Accordion 0.3: filter long sidebars

‎docs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ features:
8080

8181
::: blog-posts
8282
limit: 3
83-
stickyLimit: 1
83+
pinLimit: 1
8484
layout: grid
8585
more: Read the blog →
8686
:::

‎docs/plugins/auto-sidebar/index.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ A line that starts with a dot is a setting for the folder, not an entry. Every s
7777

7878
### Sorting
7979

80-
This site's [blog](/blog/) sidebar lists sticky posts first, then the rest newest first. Its whole `.sidebar` file (the `.link` line is for [Auto Navbar](/plugins/auto-navbar#settings)):
80+
This site's [blog](/blog/) sidebar lists pinned posts first, then the rest newest first. Its whole `.sidebar` file (the `.link` line is for [Auto Navbar](/plugins/auto-navbar#settings)):
8181

8282
<<< @/blog/.sidebar{txt}
8383

@@ -92,11 +92,11 @@ This site's [blog](/blog/) sidebar lists sticky posts first, then the rest newes
9292
- Dates and numbers compare as dates and numbers, so `2` sorts before `10`.
9393
- Dates can carry a time: `2026-10-20`, `2026-10-20 14:30`, `2026-10-20T14:30:00`, or either with an offset (`-04:00`, `Z`). Pages from the same day sort by their times, and a date alone counts as the start of its day. A time without an offset is read as UTC, so the order is the same on every build machine; write offsets if your pages mix time zones.
9494
- Several keys, separated by commas, sort by the first and break ties with the
95-
next: `.sort: blog.sticky desc, date desc` puts sticky blog posts on top,
95+
next: `.sort: blog.pinned desc, date desc` puts pinned blog posts on top,
9696
each group newest first.
9797
- Pages without a value go last for that key, in either direction, and are
9898
ordered by the next key. A `false` value counts as no value, so pages with
99-
`sticky: false` sort with those that don't say. Final ties go by name.
99+
`pinned: false` sort with those that don't say. Final ties go by name.
100100
- A subfolder sorts by its landing page's frontmatter.
101101
- Only entries the file doesn't list are sorted. Listed entries keep their place, so the overview above stays first.
102102
- A setting covers its own folder, not the folders below it. The `sort` option sets an order for every folder; a folder's own `.sort` still wins.
@@ -144,12 +144,12 @@ index.md:All releases
144144

145145
Numbers in versions compare as numbers, so `1.10.0` sorts above `1.9.0`, which sorting by file name gets wrong. Pre-releases don't follow version rules, though: `2.0.0-beta.1` sorts above `2.0.0`. If you publish betas, sort by `date desc` instead.
146146

147-
**A blog.** Sticky posts first, then the newest posts, cut to ten. Posts can give a date (`2026-10-20`) or a date and time (`2026-10-20 14:34`), and the newest is on top either way. This site's [blog](/blog/) does exactly this with the [Blog](/plugins/blog/) plugin:
147+
**A blog.** Pinned posts first, then the newest posts, cut to ten. Posts can give a date (`2026-10-20`) or a date and time (`2026-10-20 14:34`), and the newest is on top either way. This site's [blog](/blog/) does exactly this with the [Blog](/plugins/blog/) plugin:
148148

149149
```txt
150150
# docs/blog/.sidebar
151151
index.md:All posts
152-
.sort: blog.sticky desc, date desc
152+
.sort: blog.pinned desc, date desc
153153
.limit: 10
154154
```
155155

0 commit comments

Comments
 (0)