Skip to content

fix: add separate folder metadata support#108

Merged
tylerdave merged 4 commits into
mainfrom
separate-folder-meta
Apr 13, 2026
Merged

fix: add separate folder metadata support#108
tylerdave merged 4 commits into
mainfrom
separate-folder-meta

Conversation

@tylerdave
Copy link
Copy Markdown
Member

separates folder metata from the index/folder info pages

note: while this is a breaking change, there are no backward compatibility considerations yet since the project is only in light use.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 13, 2026

Docs Site preview: https://8191ef56.rockgarden.pages.dev

claude[bot]

This comment was marked as outdated.

claude[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good implementation overall. The two previously-flagged bugs are now resolved: generate_folder_indexes no longer calls folders.update(folder_metas.keys()) (a new test covers this), and compute_folder_meta_hash correctly applies should_ignore to avoid spurious rebuilds from ignored directories.

Two previously-flagged breaking-change concerns are still present. The PR description acknowledges these are intentional given the project's early stage, but I'm re-raising them in case a deprecation log is still wanted before a wider release.

index_page = folder_pages[path]
index_path = get_url(index_page.slug, clean_urls, base_path)
if not index_page.frontmatter.get("unlisted", False):
index_path = get_url(index_page.slug, clean_urls, base_path)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously flagged and still present — Breaking change (silent): Before this PR, unlisted: true in an index.md or folder-note caused the entire folder (and its descendants) to be hidden from the nav tree via the break in the tree-building loop. Now unlisted on an index.md only suppresses index_path — the folder itself remains visible with all its children. Existing vaults that used unlisted: true in index.md to hide a section will silently see that section reappear after upgrading. A logger.warning when unlisted is found in index.md frontmatter would ease migration.


show_index_map = {}
show_index_map = {
folder_path: meta.show_index for folder_path, meta in folder_metas.items()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously flagged and still present — Breaking change (silent): show_index_map is now built solely from _folder.md metadata; show_index: true in page frontmatter is no longer read. Users who relied on show_index: true in an index.md to render the auto-listing will silently lose their folder listings after upgrading. A logger.warning when show_index is detected in a page's frontmatter would signal the required migration to _folder.md.

@tylerdave tylerdave merged commit 0f92a8b into main Apr 13, 2026
8 checks passed
@tylerdave tylerdave deleted the separate-folder-meta branch April 13, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant