[object Object]

← back to Micawallpaper

add /about route + clean-URL routes for care/history/sourcing/trade/vocabulary

fb4d87bb82030bd045ce94d6172b4740e80de273 · 2026-05-18 20:46:34 -0700 · Steve Abrams

Files touched

Diff

commit fb4d87bb82030bd045ce94d6172b4740e80de273
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon May 18 20:46:34 2026 -0700

    add /about route + clean-URL routes for care/history/sourcing/trade/vocabulary
---
 server.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/server.js b/server.js
index 5f4cfe6..12a5d78 100644
--- a/server.js
+++ b/server.js
@@ -181,6 +181,14 @@ app.get('/sample/:handle', (req, res) => {
   res.redirect(302, p.product_url || `${DW_SHOPIFY}/products/${encodeURIComponent(p.handle)}#sample`);
 });
 
+// Clean-URL routes for static content pages (resolve without .html extension).
+const CLEAN_PAGES = ['care', 'history', 'sourcing', 'trade', 'vocabulary'];
+for (const slug of CLEAN_PAGES) {
+  app.get('/' + slug, (req, res) => res.sendFile(path.join(__dirname, 'public', slug + '.html')));
+}
+// /about nav link resolves to the history page.
+app.get('/about', (req, res) => res.sendFile(path.join(__dirname, 'public', 'history.html')));
+
 // sitemap.xml + robots.txt for SEO
 app.get('/robots.txt', (req, res) => {
   res.type('text/plain').send(`User-agent: *

← 52896e9 fix /api/facets total to use niche-filtered count not pre-ni  ·  back to Micawallpaper  ·  untrack 19 .bak/.pre- snapshot files; gitignore *.bak.* and b3c8870 →