← back to Silkwallcoverings
add clean-URL routes for /care /history /sourcing /trade /vocabulary so nav links resolve without .html (matches existing href values)
dd4f28a6a26e58fddc7b394d539757fa7c59de1c · 2026-05-25 21:34:18 -0700 · Steve Abrams
Files touched
Diff
commit dd4f28a6a26e58fddc7b394d539757fa7c59de1c
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon May 25 21:34:18 2026 -0700
add clean-URL routes for /care /history /sourcing /trade /vocabulary so nav links resolve without .html (matches existing href values)
---
server.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/server.js b/server.js
index d63fe1f..a31f686 100644
--- a/server.js
+++ b/server.js
@@ -205,6 +205,12 @@ 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 for extension-less nav links — matches href values used by
+// index.html (/care, /history, /sourcing, /trade, /vocabulary).
+for (const slug of ['care', 'history', 'sourcing', 'trade', 'vocabulary']) {
+ 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: *
← 4f69bb5 add 404-guard middleware so backup files (.bak/.pre-*) never
·
back to Silkwallcoverings
·
add noopener,noreferrer to window.open(_blank) sister-site l a5f0ebe →