feat(blog): blog core — unified remark-rehype pipeline, App Router pages, post scripts
The one render chain: remark-gfm, remark-directive (mapped-tag escape hatch for future embed islands), rehype-figure, rehype-pretty-code with vesper highlighting at build time. Shipped pages are flat HTML with inline token colors and zero client JS. - lib/markdown.ts mints all /blog HTML; lib/blog.js binds the section - app/blog + app/blog/[slug] on the App Router (SSG, generateMetadata); app/post/[id] and lib/posts.js removed with the route - content/posts moved to content/blog; the 2021 entries are draft:true, hello-world-again is the one published post (engine fixture: figure captioning, shiki, GFM table) with its edge.png image - yarn post / yarn post:image scaffold posts and stage images - e2e smoke routes follow the rename
Showing
app/blog/[slug]/page.js
0 → 100644
app/blog/blog.module.css
0 → 100644
app/blog/page.js
0 → 100644
app/post/[id]/page.js
deleted
100644 → 0
content/blog/hello-world-again.md
0 → 100644
lib/blog.js
0 → 100644
lib/markdown.ts
0 → 100644
lib/posts.js
deleted
100644 → 0
| ... | ... | @@ -13,6 +13,8 @@ |
| "platform:build": "vercel build", | ||
| "test": "jest -c jest.config.js", | ||
| "test:watch": "jest -c jest.config.js --watch", | ||
| "post": "node scripts/new-post.mjs", | ||
| "post:image": "node scripts/add-image.mjs", | ||
| "test:e2e": "playwright test", | ||
| "test:e2e:ui": "playwright test --ui" | ||
| }, | ||
| ... | ... | @@ -40,10 +42,17 @@ |
| "react-masonry-css": "^1.0.16", | ||
| "react-player": "^2.14.1", | ||
| "react-syntax-highlighter": "^15.5.0", | ||
| "remark": "^14.0.0", | ||
| "remark-html": "^15.0.0", | ||
| "rehype-pretty-code": "^0.14.5", | ||
| "rehype-stringify": "^10.0.1", | ||
| "remark-directive": "^4.0.0", | ||
| "remark-gfm": "^4.0.1", | ||
| "remark-parse": "^11.0.0", | ||
| "remark-rehype": "^11.1.2", | ||
| "shiki": "^4.4.3", | ||
| "swiper": "^11.2.6", | ||
| "tailwindcss": "^4.2.1" | ||
| "tailwindcss": "^4.2.1", | ||
| "unified": "^11.0.5", | ||
| "unist-util-visit": "^5.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@playwright/test": "1.60.0", | ||
| ... | ... |
This diff is collapsed.
Click to expand it.
scripts/add-image.mjs
0 → 100644
scripts/new-post.mjs
0 → 100644
Please
register
or
sign in
to comment