Summary
It would be useful to have a way to pin important pages to the top of the sidebar explorer, making frequently accessed notes easily available regardless of their location in the page tree.
Motivation
Many wikis have a handful of pages that are used constantly. Currently, these pages can become buried in the filesystem hierarchy and require repeated navigation.
A lightweight pinning mechanism would provide quick access without requiring changes to the underlying directory structure.
Proposed approach
One possibility would be to support a frontmatter property such as:
---
leafwiki_pinned: true
---
Pages with this property could automatically appear in a dedicated Pinned section at the top of the sidebar explorer.
The Pinned section would behave as a virtual view over existing notes. Pinned pages would remain in their normal filesystem locations, and the underlying directory structure would not need to change.
To make the feature easy to use, LeafWiki could provide simple UI actions that manage this property automatically, for example:
- a 📌 pin button while viewing a page;
- a Pin page / Unpin page action in the page's context menu within the sidebar explorer.
Using these actions would simply add or remove the leafwiki_pinned frontmatter property, allowing users to manage pinned pages without manually editing metadata.
The Pinned section would only be shown when one or more pages are pinned, so existing installations would see no UI changes unless the feature is used.
Since LeafWiki already has stable leafwiki_id values for pages and existing mechanisms for ordering items, a pinned section could potentially use the same general approach as the rest of the explorer. The implementation details could follow whatever best fits the current architecture.
This approach has several advantages:
- keeps the feature filesystem-driven;
- preserves the existing note hierarchy;
- works naturally with external editors and tooling;
- provides a convenient UI while keeping the underlying state transparent;
- avoids introducing additional metadata beyond the pinning property itself.
Expected behavior
- Pages marked with
leafwiki_pinned: true appear in a Pinned section at the top of the sidebar.
- The normal filesystem tree remains unchanged below.
- If
leafwiki_pinned is added or removed outside the UI, the pinned section updates after LeafWiki next reconciles/syncs filesystem changes.
- Unpinned pages behave exactly as they do today.
Alternatives
A UI-managed favorites list could also work, but a frontmatter-based approach seems to align well with LeafWiki's filesystem-centric design philosophy while remaining portable across installations and external editing workflows.
Curious whether something like this would fit in LeafWiki's roadmap.
Summary
It would be useful to have a way to pin important pages to the top of the sidebar explorer, making frequently accessed notes easily available regardless of their location in the page tree.
Motivation
Many wikis have a handful of pages that are used constantly. Currently, these pages can become buried in the filesystem hierarchy and require repeated navigation.
A lightweight pinning mechanism would provide quick access without requiring changes to the underlying directory structure.
Proposed approach
One possibility would be to support a frontmatter property such as:
Pages with this property could automatically appear in a dedicated Pinned section at the top of the sidebar explorer.
The Pinned section would behave as a virtual view over existing notes. Pinned pages would remain in their normal filesystem locations, and the underlying directory structure would not need to change.
To make the feature easy to use, LeafWiki could provide simple UI actions that manage this property automatically, for example:
Using these actions would simply add or remove the
leafwiki_pinnedfrontmatter property, allowing users to manage pinned pages without manually editing metadata.The Pinned section would only be shown when one or more pages are pinned, so existing installations would see no UI changes unless the feature is used.
Since LeafWiki already has stable
leafwiki_idvalues for pages and existing mechanisms for ordering items, a pinned section could potentially use the same general approach as the rest of the explorer. The implementation details could follow whatever best fits the current architecture.This approach has several advantages:
Expected behavior
leafwiki_pinned: trueappear in a Pinned section at the top of the sidebar.leafwiki_pinnedis added or removed outside the UI, the pinned section updates after LeafWiki next reconciles/syncs filesystem changes.Alternatives
A UI-managed favorites list could also work, but a frontmatter-based approach seems to align well with LeafWiki's filesystem-centric design philosophy while remaining portable across installations and external editing workflows.
Curious whether something like this would fit in LeafWiki's roadmap.