mirror of
https://github.com/bitbaum/bip-kit.git
synced 2026-12-04 04:57:05 +01:00
kivvi publishes `Geschäftsmodell` as `#das-geschaeftsmodell` (ASCII, ä→ae);
evig publishes `Kanäle` as `#ein-eingang-vier-kanäle` (unicode preserved, 8
locales). Both are correct for their site, so neither can be "the" behavior.
evig had to write its own re-slugging pass to get the second, because the
ASCII slugger would have renamed every published non-Latin anchor.
So the default does not move — a regression pin asserts today's outputs
byte-for-byte, including the German ä→ae case — and a policy is now an
option instead:
parseContentBlocks(body, { slugify: unicodeSlugify })
extractToc(blocks, { slugify: unicodeSlugify })
`unicodeSlugify` ships ready-made (lowercase, punctuation stripped, letters
/numbers/marks of any script kept), verified byte-identical to evig's local
pass over all 725 headings in its 101 published post files. Any
`(text: string) => string` works as a third policy; de-duplication and the
`section` fallback are applied on top, so consumers compose rather than
reimplement.
Both callers now derive ids through the one `createSlugger`, deleting
extractToc's duplicate dedup loop: a heading's id and the TOC entry linking
to it are the same anchor and can no longer drift — the exact bug evig's
migration had to work around.
README also corrects two things real adopters hit: the slug policy is
documented with a warning that changing it on a published site renames every
anchor, and `parseFrontmatter` is now plainly described as a `key: value`
scanner rather than a YAML parser — quoted titles containing colons,
booleans, numbers and nesting need gray-matter, which is what kivvi keeps it
for. No YAML parser is being rewritten here.
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
99 lines
2.3 KiB
JSON
99 lines
2.3 KiB
JSON
{
|
|
"name": "bip-kit",
|
|
"version": "0.2.4",
|
|
"description": "Building in Public, as a content contract: parse markdown into typed blocks and render them with a reference React renderer (bip-kit/react) \u2014 blog, roadmap, changelog on your product site, bring your own design tokens.",
|
|
"license": "MIT",
|
|
"author": "Mao Nakamoto",
|
|
"homepage": "https://github.com/bitbaum/bip-kit#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/bitbaum/bip-kit.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/bitbaum/bip-kit/issues"
|
|
},
|
|
"keywords": [
|
|
"build-in-public",
|
|
"blog",
|
|
"roadmap",
|
|
"changelog",
|
|
"markdown",
|
|
"headless",
|
|
"content",
|
|
"nextjs",
|
|
"react",
|
|
"rsc",
|
|
"renderer"
|
|
],
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"packageManager": "pnpm@11.25.0",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"styles.css"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./react": {
|
|
"types": "./dist/react/index.d.ts",
|
|
"default": "./dist/react/index.js"
|
|
},
|
|
"./react/mermaid": {
|
|
"types": "./dist/react/mermaid.d.ts",
|
|
"default": "./dist/react/mermaid.js"
|
|
},
|
|
"./styles.css": "./styles.css"
|
|
},
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.json",
|
|
"lint": "eslint .",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"test": "node --test test/*.test.js",
|
|
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run build && pnpm test",
|
|
"prepare": "pnpm run build",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/node": "^26.4.0",
|
|
"@types/react": "^19.2.18",
|
|
"eslint": "^10.9.1",
|
|
"globals": "^17.11.0",
|
|
"katex": "^0.18.5",
|
|
"prettier": "^3.9.6",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"shiki": "^4.4.3",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.68.0"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=18",
|
|
"shiki": ">=1",
|
|
"mermaid": ">=10",
|
|
"katex": ">=0.16"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"shiki": {
|
|
"optional": true
|
|
},
|
|
"mermaid": {
|
|
"optional": true
|
|
},
|
|
"katex": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|