Skip to content

Generate repository pages and Starlight sidebar from templates - #20

Closed
lakruzz with Copilot wants to merge 7 commits into
mainfrom
copilot/generate-repository-pages-template-sidebar-module
Closed

lakruzz with Copilot wants to merge 7 commits into
mainfrom
copilot/generate-repository-pages-template-sidebar-module

Conversation

Copilot AI commented Nov 5, 2026 •

Copy link
Copy Markdown

sidebar mode now generates a Markdown page for each matching repository and a Starlight sidebar linking to those pages. YAML, JSON, and HTML remain single-file exports.

  • CLI and configuration

    • Add --pages-dir, --template, --base-url, --badge-url, and --starlight; support matching index: settings.
    • Default pages directory: docs/content/repo. Flags override .docs.yml, which overrides defaults.
    • --starlight copies the maintained starter template without querying GitHub and refuses to overwrite an existing file.
  • Pages and metadata

    • Render Markdown with Go text/template and gh-docs-specific [% ... %] delimiters; provide a yaml helper for front matter.
    • Expose repository details, topics, commit and version metadata, stars, license, and update time. Optional lookup failures warn and leave fields empty.
    • Generate sorted, safe repository slugs; detect collisions and prepare page and sidebar content before writing.
  • Sidebar and documentation

    • Export one Starlight group with JSON-encoded labels and local links to pages generated in the same run.
    • Document routes, template fields, imports, and manual cleanup of stale pages.
gh docs index --owner mindovermachine-dev \
  --format sidebar \
  --file docs/sidebar/repositories.mjs \
  --pages-dir astro/src/content/docs/repositories \
  --template astro/repository-template.md

Copilot AI changed the title [WIP] Extend gh docs index command to generate pages and sidebar module Generate repository pages and Starlight sidebar from templates Nov 5, 2026
Copilot AI requested a review from lakruzz November 5, 2026 10:23

@lakruzz lakruzz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed commit 79d4b67 (MDX template support). One finding is attached on the new template: the hero Documentation action should be omitted when .HomepageURL is empty.

hero:
tagline: Index of reference documentation for the products stewarded by Mind over Machine.
actions:
- text: Documentation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The Documentation hero action is emitted even when .HomepageURL is empty, which creates a Starlight action with a blank link for repos without a homepage. The body link below is conditional, but this frontmatter entry is not. Please make the hero action conditional too, or otherwise omit it when there is no homepage URL.

@lakruzz
lakruzz self-requested a review November 5, 2026 11:32
@lakruzz
lakruzz self-requested a review November 5, 2026 11:38
lakruzz pushed a commit that referenced this pull request Nov 5, 2026
…lves #20

08c259c: Linting #19

79d4b67: Related to #19

db54439: Handle template output and satisfy new lint checks

ed6f3a3: Move Starlight scaffold to template command

2811647: Create pages directory for empty sidebar results

7237bbf: Generate repository pages for sidebar mode

e9c150f: Initial plan
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Closed by Ready action after successful fast-forward merge to 'main' via 'ready/copilot/generate-repository-pages-template-sidebar-module'.

@github-actions github-actions Bot closed this Nov 5, 2026
@lakruzz
lakruzz deleted the copilot/generate-repository-pages-template-sidebar-module branch November 5, 2026 11:39
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.

index: generate repository pages from a template and a sidebar module

2 participants