← back to Raffiawallcoverings
add clean-URL routes: /history /vocabulary /sourcing /care /trade
4dc8db005cdf184fc0d3a3772ca0b69cad6420a8 · 2026-05-25 21:25:57 -0700 · Steve Abrams
Files touched
Diff
commit 4dc8db005cdf184fc0d3a3772ca0b69cad6420a8
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon May 25 21:25:57 2026 -0700
add clean-URL routes: /history /vocabulary /sourcing /care /trade
---
server.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/server.js b/server.js
index aec929a..1a442ae 100644
--- a/server.js
+++ b/server.js
@@ -200,6 +200,13 @@ app.get('/sample/:handle', (req, res) => {
// /about → served by the "short history" page (no dedicated about.html exists)
app.get('/about', (req, res) => res.sendFile(path.join(__dirname, 'public', 'history.html')));
+// Clean-URL routes — nav links throughout the site use extension-less paths
+// (/history, /vocabulary, /sourcing, /care, /trade). Map them to their .html
+// files so the nav doesn't 404.
+for (const slug of ['history', 'vocabulary', 'sourcing', 'care', 'trade']) {
+ app.get('/' + slug, (req, res) => res.sendFile(path.join(__dirname, 'public', slug + '.html')));
+}
+
// sitemap.xml + robots.txt for SEO
app.get('/robots.txt', (req, res) => {
res.type('text/plain').send(`User-agent: *
← 82ccdbc add 404 catch-all guard (JSON for /api/*, text otherwise) —
·
back to Raffiawallcoverings
·
drop p.vendor render on Ideas rail-card (replace with 'Desig 7c5839b →