Commit Graph
31 Commits
Author SHA1 Message Date
AverageMarcus 22789160fd Full post content in RSS
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2026-11-16 17:11:30 +00:00
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 fd867c7262 Updarte social share image
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2025-02-02 08:28:23 +00:00
AverageMarcus 21f1d9216c Updated redirect rules
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2022-07-21 07:03:17 +01:00
AverageMarcus 0bd69bd3f3 Handle more missing icons
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2022-07-19 07:08:25 +01:00
AverageMarcus 1b2e0d7501 Added redirect logic
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2022-07-05 05:41:52 +01:00
AverageMarcus 0aaf47909f Updated description
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2022-05-02 14:36:57 +01:00
AverageMarcus 186bdde093 Glitch theme
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2022-05-02 14:29:27 +01:00
AverageMarcus d01a3f227c Cleaned up some unneccisary redirects 2021-09-05 07:48:49 +01:00
AverageMarcus c10c858988 Handle some 404's better 2021-09-03 07:02:57 +01:00
AverageMarcus 58b92b4628 Added /healthz endpoint 2021-06-15 04:57:09 +01:00
AverageMarcus 8f13ad501d Added opengraph image to posts 2021-05-12 09:27:51 +01:00
AverageMarcus bd66550ccc Added sitemap 2021-01-29 22:45:22 +00:00
AverageMarcus cb6c8919b4 Redirect invalid feed requests 2020-11-21 20:22:43 +00:00
AverageMarcus 09b375f666 Added robots.txt 2020-11-18 12:14:51 +00:00
AverageMarcus 7a4e1324ee Add blackhole routes to common exploit crawlers 2020-11-18 12:12:40 +00:00
AverageMarcus e19ed52605 Added draft AV post 2018-08-30 20:20:50 +01:00
Marcus Noble 62d3f0ab14 Improved title of pages 2017-10-15 17:36:59 +01:00
Marcus Noble 6a45fd1d73 Removed cache 2017-10-15 07:48:59 +01:00
Marcus Noble 04a5c1e38c Improved developer workflow 🛠 2017-10-08 15:28:37 +01:00
Marcus Noble 3ef739f477 Perf 2017-06-07 06:55:21 +01:00
Marcus Noble eef23e6164 Added icons and meta 2016-10-17 19:53:00 +01:00
Marcus Noble a4fd96a4de Open graph support 2016-07-26 13:41:47 +01:00
Marcus Noble aebfa1f960 Removed localhost 2016-07-26 10:11:56 +01:00
Marcus Noble a66f3bc760 Added support for drafts 2016-07-26 10:08:49 +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 c547212971 Added caching 2016-05-27 06:10:01 +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