Commit Graph
17 Commits
Author SHA1 Message Date
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 f77d618553 Block more bad bot activity
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2025-09-28 16:22:24 +01:00
AverageMarcus bdd2e8c79a Update blocked routes
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2023-10-10 09:46:15 +01:00
AverageMarcus a3f0a74535 Update list of filtered routes
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2023-09-04 12:19:16 +01:00
AverageMarcus 0f90c7c0d0 Update filter routes 2022-07-22 18:38:12 +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 204f1d3a1b Merge branch 'master' of https://git.cluster.fun/AverageMarcus/blog 2021-07-31 06:22:36 +01:00
AverageMarcus 569cee1c5e Updated blackhole to point to infinite redirect 2021-07-13 05:49:44 +00:00
AverageMarcus 0a3b59f764 Updated filtering routes 2021-06-22 20:17:07 +01:00
AverageMarcus 88e9ee5d33 Filter more routes 2021-06-21 04:22:39 +01:00
AverageMarcus 1d093f3dfb Filter gz files 2021-06-21 04:19:01 +01:00
AverageMarcus ce108e696d More bot blocks 2021-02-05 21:59:58 +00:00
AverageMarcus ede7d2a77f Added more blackhole routes 2021-01-30 15:48:32 +00:00
AverageMarcus 004b41a6a1 Update 'filterRoutes.js' 2021-01-28 14:14:04 +00:00
AverageMarcus 955d28ccd1 Updated list of blocked paths 2021-01-28 14:08:09 +00:00
AverageMarcus 8c3245d36d More bot filtering 2020-11-20 08:08:51 +00:00
AverageMarcus 7a4e1324ee Add blackhole routes to common exploit crawlers 2020-11-18 12:12:40 +00:00