feat: modernize static site generator stack

- Node.js: Upgraded from v16 to v22 (latest LTS)
- SASS: Replaced deprecated node-sass with Dart Sass (sass package)
- Metalsmith plugins: Migrated to modern scoped packages:
  - @metalsmith/markdown (v1.10) replacing metalsmith-markdownit
  - @metalsmith/in-place (v5) replacing metalsmith-in-place v1
  - @metalsmith/layouts (v3) replacing metalsmith-layouts v1
  - @metalsmith/collections (v2) replacing metalsmith-collections v0
  - Added metalsmith-define for site metadata
  - Added gray-matter for YAML front matter extraction
- Markdown rendering: Updated to marked v18 for GFM support
- Express: Kept at v4.x (stable, compatible)
- Handlebars: Updated to v4.7 (latest)
- Custom plugins: Created local permalinks and handlebars-html plugins
  - Custom permalinks plugin replaces metalsmith-permalinks (broken substitute dep)
  - Custom handlebars jstransformer wrapper supports .html extension
- Feed generation: Custom RSS plugin (replaces deprecated metalsmith-feed)
- filterRoutes: Updated regex patterns for Express compatibility
- Template changes: Removed deprecated markdown="1" from partials
- Docker: Updated Dockerfile to use Node 22 Alpine
- Collection patterns: Updated to support both .md and .markdown extensions
- Pipeline: Reordered for correct metadata flow (front matter → markdown → layouts → permalinks)
This commit is contained in:
Marcus Noble committed 2026-11-16 10:39:12 +00:00
1 parent 35e9dfe24b
commit 7a5c031b1d
9 files changed
+855 -231

No files matched your search

+18 -20
View File
@@ -6,30 +6,28 @@
"watch": "nodemon --exec npm start -e \"md,html,scss,js\" -i \"build\""
},
"dependencies": {
"compression": "^1.6.2",
"express": "^4.13.4",
"handlebars": "^4.0.5",
"markdown-it-emoji": "^1.1.1",
"metalsmith": "^2.1.0",
"metalsmith-build-date": "^0.2.0",
"metalsmith-collections": "^0.7.0",
"metalsmith-define": "^2.0.1",
"metalsmith-feed": "^0.2.0",
"metalsmith-in-place": "^1.4.4",
"metalsmith-layouts": "^1.6.5",
"metalsmith-markdownit": "^0.3.0",
"metalsmith-pagination": "^1.4.0",
"metalsmith-permalinks": "^0.5.0",
"metalsmith-sass": "^2.0.0",
"@metalsmith/collections": "^2.0.0",
"@metalsmith/in-place": "^5.0.0",
"@metalsmith/layouts": "^3.0.0",
"@metalsmith/markdown": "^1.10.0",
"compression": "^1.8.2",
"express": "^4.21.2",
"gray-matter": "^4.0.3",
"handlebars": "^4.7.10",
"jstransformer-handlebars": "^1.2.0",
"marked": "^18.2.0",
"metalsmith-define": "^2.1.3",
"metalsmith-pagination": "^1.5.0",
"metalsmith-sitemap": "^1.2.2",
"moment": "^2.13.0",
"node-sass": "^6.0.0",
"striptags": "^2.1.1"
"moment": "^2.31.0",
"rss": "^1.2.2",
"sass": "^1.108.2",
"striptags": "^3.2.0"
},
"devDependencies": {
"nodemon": "^1.12.1"
"nodemon": "^3.1.0"
},
"engines": {
"node": "16"
"node": "22"
}
}