Quartz's default stacked pages plugin.
  • TypeScript 88.7%
  • SCSS 11.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-09 23:05:01 +01:00
.changeset chore: version package 2026-11-09 04:09:58 +00:00
.github/workflows ci: run ci.yml on the changesets version PR and report it as a commit status 2026-11-09 03:47:26 +01:00
src refactor(example): heading ids from the shared HeadingSlugger (utils 1.1.0); drop rehype-slug and github-slugger 2026-11-09 02:36:27 +01:00
test refactor(example): heading ids from the shared HeadingSlugger (utils 1.1.0); drop rehype-slug and github-slugger 2026-11-09 02:36:27 +01:00
types fix: use fetchData global for path-prefixed deployments 2026-03-16 18:54:25 +01:00
.eslintrc.json fix: use fetchData global for path-prefixed deployments 2026-03-16 18:54:25 +01:00
.gitignore chore: migrate to npm publishing 2026-07-23 09:07:43 +02:00
.prettierignore fix: use fetchData global for path-prefixed deployments 2026-03-16 18:54:25 +01:00
.prettierrc Initial commit 2026-03-13 18:57:52 +01:00
CHANGELOG.md chore: version package 2026-11-09 04:09:58 +00:00
LICENSE Initial commit 2026-03-13 18:57:52 +01:00
package-lock.json chore: version package 2026-11-09 04:09:58 +00:00
package.json chore: version package 2026-11-09 04:09:58 +00:00
README.md docs(readme): Quartz 5.1 — npm install and config, correct options and defaults 2026-11-09 22:57:51 +01:00
tsconfig.build.json fix: use separate tsconfig for DTS build to avoid vitest dependency 2026-03-22 13:12:01 +01:00
tsconfig.json Initial commit 2026-03-13 18:57:52 +01:00
tsup.config.ts build: keep preact and the other shared packages external (tsup's noExternal overrode them) 2026-11-09 04:49:44 +01:00
vitest.config.ts Initial commit 2026-03-13 18:57:52 +01:00

@quartz-community/stacked-pages

Binder-style stacked pages for Quartz: every page you open is added as a tab, and the tabs are shown as strips beside the page content, like the tabs of a ring binder. Pages you came from sit on the left of the current page, pages you went back from on the right, so you can retrace your path through your notes.

Installation

npx quartz plugin add @quartz-community/stacked-pages

Quartz's default configuration has a disabled entry for this plugin; set enabled: true to use it.

Usage

plugins:
  - source: "@quartz-community/stacked-pages"
    enabled: true
    options:
      maxTabs: 8
      mobileBreakpoint: 800
      showSpines: true
    layout:
      position: afterBody
      priority: 50
      display: all

Navigation works as usual: links are not intercepted and the URL is not changed, so heading anchors, popover previews and SPA routing keep working. After each navigation the page is added as a tab right after the current one (or, if it already has a tab, that tab becomes current). The binder appears once there are at least two tabs.

  • Click a tab to navigate to that page.
  • Close a tab with its × button. Closing the current tab navigates to the nearest remaining one.
  • With more than maxTabs tabs, the oldest tab furthest from the current one is dropped.

The tabs are kept in the browser's sessionStorage: they survive reloads and navigation within the browser tab, but are not part of the URL and are not shared between browser tabs. Below mobileBreakpoint the binder is hidden.

Configuration

Option Type Default Description
maxTabs number 8 Maximum number of tabs kept (including the current page).
mobileBreakpoint number 800 Viewport width (in pixels) below which the binder is hidden.
showSpines boolean true Whether to draw the coloured spine accent on each tab.
animateTransitions boolean true Accepted, but currently has no effect.

Documentation

See the Quartz documentation for more information.

License

MIT