diff --git a/netlify.toml b/netlify.toml index 41033891..91a1e599 100644 --- a/netlify.toml +++ b/netlify.toml @@ -11,8 +11,6 @@ [build.environment] # extra environment variables if needed. -# we need to manually copy the 404 page over for now, in every environment -# cf https://github.com/shift-org/shift-docs/issues/862 [context.deploy-preview] # -D builds draft content for deploy previews # ( the doubledash is needed to pass the argument through to hugo ) diff --git a/package.json b/package.json index 4a648306..8ad6fd48 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,7 @@ "deploy": "concurrently --max-processes 1 -P 'npm:deploy:hugo -- {@}' 'npm:deploy:vite' --", "deploy:hugo": "exec-bin bin/hugo/hugo -s site", "deploy:vite": "npm -w cal run deploy", - "postdeploy": "cp site/public/404/index.html site/public/404.html", - + "postinstall": "hugo-installer --version 0.152.2", "test": "npm -w app test --", diff --git a/site/content/404.md b/site/content/404.md index dbd2fd94..40098ed4 100644 --- a/site/content/404.md +++ b/site/content/404.md @@ -1,14 +1,21 @@ --- title: 'Page not found' weight: '1' +# netlify serves this file for any unmatched url, so it has to +# land at /404.html rather than hugo's default /404/index.html. +# ( _default/list.html redirects there too. ) +url: '/404.html' +# ... and a "page not found" page has no business in the sitemap. +sitemap: + disable: true --- Whoops! I think your chain broke AND you got a flat tire at the same time. Don't worry! We'll help you get back on the road pretty quickly. Maybe you're looking for one of these pages? - [Event Calendar](/calendar) -- [Pedalpalooza Event Calendar](/pedalpalooza-calendar/) -- [Pedalpalooza information](/pages/pedalpalooza) +- [Bike Summer Event Calendar](/bike-summer-calendar/) +- [Bike Summer information](/pages/bike-summer) - [Breakfast on the Bridges](/pages/bonb) - [Move By Bike](/pages/mbb) diff --git a/site/themes/s2b_hugo_theme/layouts/404.html b/site/themes/s2b_hugo_theme/layouts/404.html deleted file mode 100644 index 8fd69fa4..00000000 --- a/site/themes/s2b_hugo_theme/layouts/404.html +++ /dev/null @@ -1,59 +0,0 @@ -{{/* - this file gets overwritten by netlify.toml - with 404.md on preview and deploy. - static/admin/config.yml points to that file as well. - - the apparent advantage is that 404.md - can reuse layout/_default/single.html -*/}} - - - -
- {{ partial "head.html" . }} - - - - -