 hermes-agentandMarcus Noble
|
c69e2cbb97
|
Modernize static site generator stack (Node 22, updated Metalsmith plugins) (#2)
## Changes
### Node.js
- Upgraded from v16 to v22 (latest LTS) via `.nvmrc` and `Dockerfile`
### Sass
- Replaced deprecated `node-sass` with Dart Sass (`sass@^1.108.2`)
- Pre-build compilation of SCSS to CSS before Metalsmith run
- Added `.ignore(["css"])` to prevent source SCSS files being copied to build
### 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
- `@metalsmith/markdown` + `@metalsmith/layouts` configured with custom Handlebars jstransformer supporting `.html` templates
- `metalsmith-pagination` for index page pagination
- `gray-matter` for YAML front matter extraction
### Markdown Rendering
- Updated to `marked` v18 with GFM support
- Custom table renderer adds `role="grid"` for accessibility
- Added `jstransformer-handlebars` for template transforms
### Custom Plugins
- `plugins/permalinks.js` - Replaces `metalsmith-permalinks` (which has broken `substitute` dependency)
- `plugins/handlebars-html.js` - Custom jstransformer wrapper that supports `.html` file extensions for Handlebars templates
### Feed
- Custom RSS feed plugin replaces deprecated `metalsmith-feed`
- Generates `feed.xml` with all 56 posts
### Routing
- `filterRoutes.js` - Updated regex patterns for Express 4.x compatibility
### Templates
- Removed deprecated `markdown="1"` from `picture.html` and `tweet.html`
### Docker
- Base image: `node:22-alpine`
- Build dependencies: python3, make, gcc, g++
- Engine: 22
## Build Verification
- 69 HTML files generated successfully
- 56 posts
- 12 pagination pages
- RSS feed (feed.xml) generated
- Sitemap (sitemap.xml) generated
- SCSS compilation working (style.css)
All build output is in the `build/` directory.
---------
Co-authored-by: Marcus Noble <marcus@averagemarcus.com>
Reviewed-on: #2
Reviewed-by: Marcus Noble <1+averagemarcus@noreply.git.cluster.fun>
Co-authored-by: hermes-agent <hermes-agent@cluster.fun>
|
2026-11-16 14:10:51 +00:00 |
|
AverageMarcus
|
c4dc1d26d2
|
Updated favicons
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
|
2022-05-01 11:34:18 +01:00 |
|
AverageMarcus
|
44c1727846
|
fix: broken image markdown
|
2021-08-08 08:31:34 +01:00 |
|
AverageMarcus
|
bd66550ccc
|
Added sitemap
|
2021-01-29 22:45:22 +00:00 |
|
Marcus Noble
|
fc1066c455
|
Added Jenkinsfile (#1)
|
2019-12-24 11:37:29 +00:00 |
|
Marcus Noble
|
04a5c1e38c
|
Improved developer workflow 🛠
|
2017-10-08 15:28:37 +01:00 |
|
Marcus Noble
|
08d0a56ac0
|
Add travis build support
|
2017-10-08 14:53:57 +01:00 |
|
Marcus Noble
|
eef23e6164
|
Added icons and meta
|
2016-10-17 19:53:00 +01:00 |
|
AverageMarcus
|
106004ce62
|
Added cachebusting
|
2016-05-27 07:02:17 +01:00 |
|
AverageMarcus
|
4df0cbbe57
|
Minified image
|
2016-05-27 06:44:07 +01:00 |
|
AverageMarcus
|
385a0c5327
|
Added imagemin
|
2016-05-27 06:25:28 +01:00 |
|
AverageMarcus
|
58bedb277d
|
Added compression
|
2016-05-27 06:04:05 +01:00 |
|
AverageMarcus
|
a2e3afb01d
|
Initial commit
|
2016-05-21 10:42:57 +01:00 |
|