Skip to content

Add default root collection#231

Merged
janezd merged 1 commit into
biolab:masterfrom
janezd:add-default-root-collection
May 15, 2026
Merged

Add default root collection#231
janezd merged 1 commit into
biolab:masterfrom
janezd:add-default-root-collection

Conversation

@janezd
Copy link
Copy Markdown
Contributor

@janezd janezd commented May 15, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a synthesized default root collection so the site has a usable root listing even when no top-level index.md(x)/collection.md(x) file is present. parseCollection now falls back to a built-in # Notes content string for the root path, and updateRoot no longer guards on the existence of a root markdown file. A non-root collection without an index file still throws.

Changes:

  • parseCollection falls back to a DefaultCollectionContent (# Notes) when no index file exists at the root, and otherwise throws for non-root paths.
  • updateRoot unconditionally calls parseCollection([], []) instead of conditionally constructing the root collection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
ingest/collection.ts Adds a default root content fallback and explicit error for missing index in non-root collections.
ingest/updatePaths.ts Always parses the root collection, relying on the new fallback behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ingest/updatePaths.ts Outdated
Comment thread ingest/collection.ts
Comment thread ingest/collection.ts Outdated
@janezd janezd force-pushed the add-default-root-collection branch from 0eed5f7 to be7b1c4 Compare May 15, 2026 17:48
@janezd janezd merged commit 05c39c8 into biolab:master May 15, 2026
1 check passed
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.

2 participants