Skip to content

feat: support index.md as section file#460

Open
klocke-io wants to merge 1 commit into
gardener:masterfrom
klocke-io:feature/support-index-md-as-section-file
Open

feat: support index.md as section file#460
klocke-io wants to merge 1 commit into
gardener:masterfrom
klocke-io:feature/support-index-md-as-section-file

Conversation

@klocke-io
Copy link
Copy Markdown
Member

@klocke-io klocke-io commented May 20, 2026

Summary

  • Adds proposal to extend docforge's hardcoded _index.md section file detection to also recognize index.md
  • VitePress and other modern SSGs use index.md as section index — currently this bypasses the sectionFile special case in resolveManifestLinks, breaking overlay manifests silently
  • The docsy plugin already handles both names (plugin.go:22), confirming this was a known gap

Motivation

When downstream repos migrate from Hugo to VitePress and rename _index.mdindex.md, docforge no longer auto-generates the section index from frontmatter. Instead it treats it as a normal file, resolves its source, and fetches real content — overwritingl section metadata.

Proposal

Minimal approach: add an isSectionFile(name string) bool helper that matches both _index.md and index.md, update the 5 affected call sites. Full details in the proposal document.

Test plan

  • Review proposal at openspec/changes/support-index-md-as-section-file/proposal.md
  • Discuss approach and approve before implementation

@gardener-prow
Copy link
Copy Markdown

gardener-prow Bot commented May 20, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kostov6 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow Bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels May 20, 2026
@klocke-io klocke-io force-pushed the feature/support-index-md-as-section-file branch from c490365 to 8818f1b Compare May 20, 2026 08:40
Adds openspec proposal to extend docforge's hardcoded _index.md
section file detection to also recognize index.md, enabling
VitePress-migrated repos to work without reverting renames.
@klocke-io klocke-io force-pushed the feature/support-index-md-as-section-file branch from 089b037 to 4910a0d Compare May 20, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant