flexweg-archives
The flexweg-archives plugin generates static archive pages grouped by year — and optionally by month or ISO week — under /archives/. It's the static-friendly alternative to pagination: instead of ?page=2, visitors browse by time period.
It also injects a "See full archives" link on home and category listings so the entry point is discoverable without manual menu work.
What it generates
| Page | Path on Flexweg | Contents |
|---|---|---|
| Index | /archives/index.html | Every period (year, optionally month/week) with post counts |
| Year | /archives/2026/index.html | All online posts created in 2026 |
| Month | /archives/2026/03/index.html | All online posts created in March 2026 |
| Week | /archives/2026/W12/index.html | All online posts created in ISO week 12 of 2026 |
Each page renders through the active theme's category template (via archive if the theme provides one — fallback to category), so look + feel matches the rest of the site without per-theme work.
Settings
/settings/plugin/flexweg-archives exposes:
- Drill-down —
year,year + month, oryear + month + week. Defaultyear. - Show month grid on year pages — small table of months on each year page (default on).
- Show counts — appends
(N)to each period link in the index (default on). - Inject "See full archives" link — on home / category templates (default on). Position is theme-controlled (typically below the post list).
- Force regenerate — wipes
/archives/on Flexweg and rebuilds every period page + the index from scratch.
How it hooks in
Three lifecycle actions:
api.addAction("publish.complete", regenerate);
api.addAction("post.unpublished", regenerate);
api.addAction("post.deleted", regenerate);
Each handler:
- Computes the affected periods from
post.createdAt(year, month, week as configured). - Rebuilds those periods' pages — or deletes them if they emptied out (empty year sitemap = empty archive year, file goes away).
- Rebuilds
/archives/index.html.
It also registers a Regeneration target for Themes → Regenerate site → Archives.
When changes apply
| Action | Files updated | Latency |
|---|---|---|
| Publish a post | Touched periods + /archives/index.html | Within seconds |
| Unpublish / delete | Same (empty periods get deleted) | Within seconds |
| Toggle drill-down (e.g. year → year+month) | None automatically | Run Force regenerate |
| Settings save (other) | None automatically | Run Force regenerate |
Drill-down changes don't auto-regenerate because going from year to year + month would create dozens of new files but leave the old ones in place — Force regenerate is the correct one-click escape hatch.
"See full archives" link
When Inject "See full archives" link is on, the plugin filters post.template.props for home / category renders and adds an archivesLinkUrl field. The active theme's templates include this field by convention — the default and magazine themes both render it as a footer link below the post grid.
Themes that don't render the field (e.g. minimal custom themes) silently ignore it. To add support in your own theme:
{props.archivesLinkUrl && (
<a href={props.archivesLinkUrl} className="archives-link">
See full archives →
</a>
)}
Toggle
Plugins → Plugins tab → flexweg-archives card → Enable / Disable.
Disabling does not delete files already on Flexweg. To clean up after a disable, delete /archives/ via Flexweg's file manager.
Internal details
- Source:
src/plugins/flexweg-archives/ - External in production builds: yes
- Hooks used:
publish.complete,post.unpublished,post.deletedactions;post.template.propsfilter;registerRegenerationTarget - Storage path:
/archives/ - Translations: 7 locales
Continue
- Sitemaps plugin
- Site features: Archives — visitor-facing details
- Themes overview — how the active theme renders archive pages