Repository navigation
feat: loadCollection for any MDX folder, and a reset-free prose.css - #26
Merged
Merged
Conversation
- loadCollection(dir, parse?) in ./content loads content/<dir>/*.mdx, skips _ files, and types/validates frontmatter through an optional parser (a zod .parse works). Parser errors name the file. - ./prose.css: tokens + prose + component kit + mermaid, with no global reset, for host sites with their own layout. The reset moved from styles/tokens.css to styles/base.css; styles.css output is unchanged.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CI's npm audit --audit-level=high gate started failing on advisories published after the last green main run (27 Sep): - next 16.3.6 -> 16.3.8 in templates/examples (six advisories, <16.3.8) - sharp override 0.35.4 -> 0.35.5 (GHSA-wq5f-xc86-pv6w) - vitest ^3.2.4 -> ^4.1.12 (critical GHSA-82fw-gwwq-j7x9; drops tinypool, critical GHSA-5gmw-xhrv-c9v3 / GHSA-85c8-ppgw-ccpr) - vite override ^7.3.7 (five advisories <=7.3.6; also keeps vitest off vite 8, whose optional devtools peers crash npm 10's peer resolution) - @modelcontextprotocol/sdk ^1.29.0 -> ^1.32.1 (five advisories <1.32.0) - source-map-js, hono and katex via npm audit fix npm audit --audit-level=high now exits 0. Four moderate sprintf-js/js-yaml findings under gray-matter remain (fix needs a gray-matter downgrade).
Next.js 16.3.8 built with a deployment adapter (Vercel) writes prerendered HTML to .next/server/route-cache/APP_PAGE/<hash>/$/<route>.html instead of .next/server/app, so the postbuild `pagefind --site .next/server/app` found no files and failed the Vercel builds of inkform-docs and pokeapi. Templates and examples now run scripts/pagefind.mjs, which reads both layouts and indexes each page through Pagefind's Node API under its real URL (/docs/intro rather than /docs/intro.html); Next's _not-found and _global-error pages are skipped. The .html redirect stays for old links. The script lives in each template (not in the framework package) because the CLI scaffolds templates from GitHub main while @inkform/framework comes from npm.
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.
Two small additions for sites that use Inkform for MDX but have their own design and their own content types. These came out of the business.charan.dev rebuild, which loads podcast episodes and course notes and has its own design system.
loadCollection(dir, parse?)In
@inkform/framework/content:content/<dir>/*.mdx, sorted by file name.dircan be nested, e.g.podcast/episodes._-prefixed files, so_example.mdxand drafts can sit next to real entries.parse(optional) types and validates the frontmatter. A zod schema's.parseworks.parsethrows, the error starts withInvalid frontmatter in content/<dir>/<file>:, so a bad field fails the build with a pointer to it.slug,file,data,content,excerptandreadingTime.@inkform/framework/prose.cssprose.css,components.cssandmermaid.css.html,bodyor bare elements. Every rule stays inside.fw-*.styles/tokens.cssinto a newstyles/base.css.styles.cssimports it right after the tokens, so its output is unchanged. I diffed the flattened CSS, ignoring comments and whitespace: identical.Dependency fix (second commit)
CI's
npm audit --audit-level=highgate was failing on advisories published sincemainlast passed (27 Sep). It would fail onmaintoo.next16.3.6 → 16.3.8 in the templates and examples.sharpoverride 0.35.4 → 0.35.5.vitest^3.2.4 → ^4.1.12. This clears the critical vitest and tinypool advisories.viteoverride at ^7.3.7. It also keeps vitest off vite 8, whose optional devtools peers crash npm 10's peer resolution.@modelcontextprotocol/sdkfloor raised to ^1.32.1.npm audit fixfor source-map-js, hono and katex.Four moderate
sprintf-js/js-yamlfindings under gray-matter remain, below the gate. Fixing them needs a gray-matter downgrade.Search index fix (third commit)
Next 16.3.8 is a security release, so the bump is required. Built with a deployment adapter, as on Vercel, it writes prerendered HTML to
.next/server/route-cache/APP_PAGE/<hash>/$/<route>.htmlinstead of.next/server/app/. Thepagefind --site .next/server/apppostbuild therefore found 0 files and failed the inkform-docs and pokeapi Vercel builds.node scripts/pagefind.mjs./docs/intro, not/docs/intro.html) through Pagefind's Node API._not-foundand_global-errorpages are skipped..htmlredirect stays, so old links keep working.mainwhile@inkform/frameworkcomes from npm, so a framework bin would break new scaffolds until the next release.Test plan
npm cion Node 22 / npm 10 works from the new lockfile.npm run typecheck: passes across all workspaces.npm test: 16 files, 110 tests pass on vitest 4, including 4 newloadCollectiontests.npm audit --audit-level=high: exits 0.npm run build: left to CI (six Next builds).examples/markdown-docsin two builds:NEXT_ADAPTER_PATH), which reproduces Vercel's layout: 0 HTML files inapp/, the old postbuild fails the same way, and the script indexes 22 pages.prose.cssflattened: nohtmlorbodyrules.No version bump. The changelog entry is under
[Unreleased].