Skip to content

feat(astro): changelog ids per entry, authoring docs, optional credit line - #31

Merged
CharanMN7 merged 1 commit into
mainfrom
feat/astro-changelog-credits
Oct 27, 2026
Merged

CharanMN7 merged 1 commit into
mainfrom
feat/astro-changelog-credits

Conversation

@CharanMN7

Copy link
Copy Markdown
Contributor

Covers the changelog gaps in @inkform/astro and adds an optional "Built with Inkform" credit.

Changelog: what was already there, what was missing

The route, the page and the format already existed. With entries in content/changelog/, the integration serves <base>/changelog, adds a header link, lists the page in llms.txt and includes the entries in llms-full.txt. The format is the same as the Next.js themes' /changelog. Compared with the Next.js page, nothing was unwired. Two things were missing:

  • Duplicate ids. Each entry's MDX is rendered on its own, so every release with an ### Added section produced id="added". GFM footnotes collided the same way. Now:
    • heading and footnote ids inside an entry are scoped to it (#v0-2-0-added), along with the # links and aria-describedby/aria-labelledby that point at them (scopeIds());
    • entries whose files share a name (2026-01-05-update.mdx, 2026-02-09-update.mdx) get distinct anchors. The oldest keeps the plain one, so links don't move when a newer entry is added (changelogAnchors()).
    • Small fixes: version: v1.2.0 no longer shows as vv1.2.0, and the date is a <time> element.
  • No docs. The README now has a "Changelog" section covering the file naming (YYYY-MM-DD-<slug>.mdx), the frontmatter (title, date, version, status: draft/scheduled, tags), anchors, grouping under ### headings, and where entries show up.

Credit

There was no credit anywhere in the repo. This adds credits: true, which shows a small, muted "Built with Inkform" link under each docs page, after prev/next. It links to https://github.com/inkform-dev/framework, the repo @inkform/astro lives in, and is marked data-pagefind-ignore="all" so search doesn't index it.

Off by default, because:

  • the README promises the integration "adds routes under base and nothing else";
  • its other reader-visible extras are opt-in (mermaid: false);
  • none of the Next.js themes has a credit;
  • turning it on by default would add a link to every existing 0.1.0 site on upgrade.

The option name follows Starlight's credits, which Astro users will recognise.

Example and tests

  • examples/astro-docs: both changelog entries use grouped ### Added sections, and the example turns credits on.
  • New unit tests cover changelogAnchors, versionLabel, scopeIds across two rendered entries with footnotes, and the credits option.
  • New e2e tests:
    • versions, dates, TOC and anchors on the changelog page, with no duplicate id on the page;
    • the credit link and its pagefind-ignore.

The CHANGELOG has Unreleased entries. No version bump.

Test plan

  • npm test --workspace=@inkform/astro: 79 pass.
  • npm run typecheck for @inkform/astro and the example: 0 errors.
  • npm run test:e2e --workspace=@inkform/example-astro-docs: 38 pass.
  • I looked at desktop screenshots of /docs/changelog and of the credit line under /docs/quickstart.

🤖 Generated with Claude Code

https://claude.ai/code/session_011YQ6fJxGHg3CxGkTzw6Yhc

… line

The changelog page rendered every entry's MDX on its own, so two releases
with an "Added" section both had id="added" (and their footnotes collided the
same way). Heading and footnote ids inside an entry are now scoped to it
(#v0-2-0-added), with the links and ARIA references that point at them, and
entries whose files share a name get distinct anchors, the oldest keeping
the plain one. A version written as v1.2.0 no longer shows as vv1.2.0, and
the date is a <time> element.

The README documents how to write entries: file names, frontmatter, status,
anchors, grouping under ### headings. The format is the Next.js themes' own.

A new `credits` option adds a small "Built with Inkform" link to the
repository under each page, outside the search index. It's off by default,
like the integration's other additions to what readers see.

The example's changelog uses grouped sections, and it turns credits on; e2e
tests check both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011YQ6fJxGHg3CxGkTzw6Yhc
@vercel
vercel Bot temporarily deployed to Preview – framework-inkform-docs October 27, 2026 08:58 Inactive
@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
framework-inkform-docs Skipped Skipped Oct 27, 2026 8:58am UTC
pokeapi Skipped Skipped Oct 27, 2026 8:58am UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – pokeapi October 27, 2026 08:58 Inactive
@CharanMN7
CharanMN7 merged commit 40e0529 into main Oct 27, 2026
5 checks passed

This branch was previously deployed

2 inactive deployments
Preview – pokeapi — acdf4cf0 Deployed Oct 27, 2026 by vercel[bot]
Preview – framework-inkform-docs — acdf4cf0 Deployed Oct 27, 2026 by vercel[bot]
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