[object Object]

← back to Fabricwallpaper

feat: clean-URL routes for static pages; /about resolves to history page

6db82c84fe5fad556d03d498b58262022c773399 · 2026-05-19 07:53:14 -0700 · Steve Abrams

Adds /history /care /sourcing /trade /vocabulary extension-less routes
and an /about alias (no dedicated About page exists) so the header +
footer About links no longer 404.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 6db82c84fe5fad556d03d498b58262022c773399
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue May 19 07:53:14 2026 -0700

    feat: clean-URL routes for static pages; /about resolves to history page
    
    Adds /history /care /sourcing /trade /vocabulary extension-less routes
    and an /about alias (no dedicated About page exists) so the header +
    footer About links no longer 404.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
 server.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/server.js b/server.js
index c55db50..6c039c8 100644
--- a/server.js
+++ b/server.js
@@ -146,6 +146,14 @@ app.use((req, res, next) => {
 
 app.use(express.static(path.join(__dirname, 'public')));
 
+// Clean-URL routes — serve extension-less nav links from public/*.html
+const CLEAN_PAGES = ['history', 'care', 'sourcing', 'trade', 'vocabulary'];
+for (const name of CLEAN_PAGES) {
+  app.get('/' + name, (req, res) => res.sendFile(path.join(__dirname, 'public', name + '.html')));
+}
+// /about has no dedicated page — the "short history" page is the closest fit.
+app.get('/about', (req, res) => res.sendFile(path.join(__dirname, 'public', 'history.html')));
+
 app.get('/api/products', (req, res) => {
   const { q, aesthetic, vendor, page = 1, limit = 24, sort = 'newest'} = req.query;
   let list = PRODUCTS_NICHE;

← 5a9dfc6 chore: untrack snapshot .bak/.pre- files, broaden .gitignore  ·  back to Fabricwallpaper  ·  fix: add noreferrer to external target=_blank Facebook link be90be6 →