Repository navigation
@inkform/astro, and @inkform/framework 0.8.0 - #28
Merged
Merged
Conversation
…-Next hosts
Additive pieces the Astro integration builds on; the Next.js APIs and their
output are unchanged.
- ./mdx-options: the remark/rehype plugin lists and next-mdx-remote options
<Mdx> renders with (it now reads them from here), plus compileMdx() for
hosts that render MDX to a React element themselves. compileMdx resolves
every capitalized component the source uses through the map, so the
mdxComponents() fallback renders unknown components: compiled MDX copies
`components` with an object spread, which can't see a Proxy's fallback.
- ./routes: apiTab, apiTabSlug, docRouteSlugs, joinHref. Pure, no IO.
slugify moves to a pure ./slug module; ./content re-exports it.
- buildLlmsTxt({ basePath }) prefixes doc, blog and changelog links for docs
served under a path. Defaults to '', so existing output is the same.
- Subpath exports for browser code outside React: ./mermaid/render,
./openapi-render/try-it, ./openapi-render/sample.
- next is an optional peer dependency: nothing in src imports it, and npm
no longer installs Next.js into a site that doesn't use it.
Tests: routes, compileMdx (pipeline, kit, fallback), llms.txt basePath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyuLZBytD3smoMaGTbXTYZ
…ontent
inkform({ base, contentRoot, theme, ... }) serves a content folder from any
Astro site under one base path (default /docs), with prerendered routes
that work in an output: 'server' app:
- docs pages from docs.json + MDX, the native API Reference (index and a
page per operation), blog and changelog when their folders have entries,
and llms.txt / llms-full.txt, all from one injected [...slug] route whose
getStaticPaths reads the content. Two sources claiming one URL fail the
build with both names.
- MDX goes through the framework's pipeline (compileMdx) with every kit
component available without imports, and operation pages are the
framework's OperationPage; React renders both to static HTML at build
time. The shell (header, tabs, sidebar, TOC, breadcrumbs, pagination,
drawer) is Astro components with the framework's fw-* markup.
- In the browser, small modules and no React: tabs, code groups, TOC
highlight, drawer, theme toggle, search dialog, API sample pickers, Try It
(the framework's request executor), newsletter form, and Mermaid diagrams
when the mermaid option is on.
- Pagefind indexes the built docs pages in astro:build:done, into
<base>/_pagefind/. The index comes from getFiles(): writeFiles() returned
before its files were written in about one run in four, leaving an empty
pagefind.js.
- Works under security.csp: Shiki's inline style attributes move into one
<style> per page, whose hash is registered with Astro.csp along with the
theme script's; search pages add 'wasm-unsafe-eval' and diagram pages
inline styles, on their own policy only.
- Themes are --fw-* token files: galley (default, ported from
templates/galley), plain, or your own; customCss for more. publicBase for
hosts that serve the docs from another path or host. Site-root links to
docs pages get the base added, so Next.js-theme content works as is.
examples/astro-docs is a host app (output: 'server', Node adapter, a React
island on its own home page, CSP on) with every component on one page and a
Playwright suite: 34 tests over pages, CSP, kit behaviour, search, Try It
and the absence of React on docs pages.
Root: the vite ^7.3.7 override now applies to vitest only, since Astro 7
needs Vite 8; npm test also runs the integration's unit tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyuLZBytD3smoMaGTbXTYZ
- README, CONTRIBUTING: the new package and example; npm test covers both packages. - CHANGELOG [Unreleased]: the framework additions and the new package. - PUBLISHING and release.yml: an astro-v* tag publishes packages/astro, after the framework release it depends on. - ci.yml: an astro-e2e job runs the example's Playwright suite. It builds and serves the example itself and blocks every outside request. - The Claude Code skill points Astro sites at @inkform/astro. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyuLZBytD3smoMaGTbXTYZ
mermaid is only resolved when the `mermaid` option is on, so it's an optional peer, as in @inkform/framework. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyuLZBytD3smoMaGTbXTYZ
Templates and examples move from Next.js 16.3.8 to 16.4.2 for the critical advisories in 16.0.0-16.4.0 (remote code execution in image optimization with SVGs and in 'use cache' functions; a Server Actions DoS). npm audit fix updates DOMPurify and ip-address in the lockfile. npm audit --audit-level=high is clean; lint, typecheck, unit tests, every build and the Astro e2e pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCbnXZc9E5T8kYNNv2JekV
Bumps packages/framework to 0.8.0 and dates the CHANGELOG entry: the new
./mdx-options, ./routes, ./slug, ./mermaid/render, ./openapi-render/try-it
and ./openapi-render/sample exports, buildLlmsTxt({ basePath }), next as an
optional peer, and the Next.js 16.4.2 / audit fixes. Every 0.7.0 export is
still present.
Templates, examples and @inkform/astro move to "@inkform/framework": "^0.8.0"
in the same commit (for a 0.x package ^0.7.0 stops below 0.8.0).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCbnXZc9E5T8kYNNv2JekV
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Astro 7 needs Node >= 22.23.4 and the runners' Node 22 is 22.23.3, so astro check failed in ci and would fail in release. Node 24 is what the branch was verified on locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCbnXZc9E5T8kYNNv2JekV
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
@inkform/astro, an Astro 7 integration that serves an Inkform content folder from any Astro site. It also prepares@inkform/framework0.8.0, which the integration needs.@inkform/astro (new, 0.1.0)
<base>/[...slug]route covering:llms.txtandllms-full.txt.react-dom/staticat build time, so the markup matches the Next.js themes.<style>per page.base,trailingSlashand static/server output, and with a packed tarball installed outside the monorepo.examples/astro-docs: 34 Playwright tests, covering every route with no CSP violation, every kit component, search, Try It, and no React on docs pages.@inkform/framework 0.8.0 (additive)
./mdx-optionsandcompileMdx();./routes:apiTab,apiTabSlug,docRouteSlugs,joinHref;./slug;./mermaid/render,./openapi-render/try-it,./openapi-render/sample.buildLlmsTxt({ basePath }).nextis now an optional peer.Security
Templates and examples move to Next.js 16.4.2:
DOMPurify and
ip-addressare fixed in the lockfile, andnpm audit --audit-level=highis clean again (it was failing onmain).Checks (local, same steps as CI)
npm run lint,npm run typecheck: clean.npm test: framework 124 tests, astro 54 tests.npm run build: all workspaces build (Next themes, examples, Astro example).npm run test:e2e --workspace=@inkform/example-astro-docs: 34 pass.npm audit --audit-level=high: 0 vulnerabilities.Release after merge
framework-v0.8.0to publish the framework throughrelease.yml(it waits for thenpm-publishapproval).@inkform/astrois a new package, so it needs one first publish to npm before trusted publishing can be configured for it. Then tagastro-v0.1.0(or later versions).🤖 Generated with Claude Code