fix: add separate folder metadata support#108
Conversation
|
Docs Site preview: https://8191ef56.rockgarden.pages.dev |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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.
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.