Add pagination (10 posts/page), category-scoped prev/next, hide share footer nav; demo link in README

This commit is contained in:
trilium-share-gruvbox
2026-08-28 13:55:54 +02:00
parent 74cf0a2b3b
commit 1664e55e4e
4 changed files with 129 additions and 24 deletions
+11 -4
View File
@@ -1,6 +1,7 @@
# Trilium Share Gruvbox Blog System
[![License](https://img.shields.io/badge/License-GPL--3.0-fb4934)](LICENSE)
[![Live demo](https://img.shields.io/badge/Live%20demo-richard.familie-zink.org-8ec07c)](https://richard.familie-zink.org)
[![TriliumNext](https://img.shields.io/badge/TriliumNext-Public%20Share-83a598)](https://github.com/TriliumNext/Trilium)
[![Theme](https://img.shields.io/badge/Theme-Gruvbox-98971a)](https://github.com/morhetz/gruvbox)
[![Built with](https://img.shields.io/badge/Built%20with-Opencode-fe8019)](https://opencode.ai)
@@ -25,6 +26,8 @@ no external dependencies (except `highlight.js`, vendored in `lib/`).
- Gruvbox light/dark theme for the share, with a theme toggle in the header.
- Blog index, category pages, sub-categories, tags and tag overview.
- **Pagination**: 10 posts per page on the index and category pages, with prev/next
navigation between the pages; article prev/next links stay within the article's category.
- Article metadata: date, category, summary, tags, prev/next navigation, reading time.
- **Digital Garden**: `state` labels (Seed → Evergreen, Draft, Review) rendered as badges and
colour-coded growth tables.
@@ -230,11 +233,15 @@ server {
## How the generator works
- Walks the blog root and collects notes with `publish=true`.
- Writes the **index** (article cards), **category pages** (sub-category chips + articles,
respecting a `<!-- blog:articles -->` marker so your hand-written intro text is kept),
**tag pages** and the **tags overview**.
- Writes the **index** (first 10 posts) plus page notes (`blog-2`, `blog-3`, …) with
prev/next navigation between the pages.
- Writes **category pages** (sub-category chips + articles, respecting a
`<!-- blog:articles -->` marker so your hand-written intro text is kept), paginated the
same way; page notes live in the `.blog` system note and are tagged with `blogPagedFor`.
- Writes **tag pages** and the **tags overview**.
- Regenerates `feed.xml` (RSS), `sitemap.xml`, `state_map` (garden states) and `blog_data`
(search index used by the header search + prev/next).
(search index with title, summary, tags and category used by the header search and the
category-scoped prev/next).
- Sets `shareDescription` on every published note from its `summary`.
## Customisation