Guides (Marty approved 2026-11-17): /guides index plus How it works, Is it legit (VASShop address, Polygonscan + Sourcify, ledger, the 20/10/5x10/20 split checked on chain), Getting the most from your free account, and the FAQ (from the chatbot answers, FAQPage schema). Nav + footer links, sitemap, /how and /faq now open the guides, chatbot 'legit' and 'guides' answers + a GUIDES fact

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 08:26:34 -06:00
parent 13255c6fda
commit 482ecc62c9
9 changed files with 241 additions and 8 deletions
+7 -4
View File
@@ -173,8 +173,10 @@ function oldLink(u) {
}
const PAGES = { '/': 'index.html', '/my': 'my.html', '/boost': 'boost.html', '/rewards': 'rewards.html', '/join': 'join.html', '/confirm': 'confirm.html', '/ledger': 'ledger.html',
'/contract': 'contract.html', '/admin': 'admin.html', '/terms': 'terms.html', '/disclaimer': 'disclaimer.html', '/privacy': 'privacy.html' };
const RESERVED = new Set(['api', 'assets', 'art', 'go', 'r', 's', 'a', 'sso', 'health', 'promote', 'sitemap.xml', 'robots.txt', 'favicon.ico', 'index.php', 'my', 'boost', 'rewards', 'join', 'confirm', 'ledger', 'contract', 'admin', 'terms', 'disclaimer', 'privacy', 'how', 'tree']);
'/contract': 'contract.html', '/admin': 'admin.html', '/terms': 'terms.html', '/disclaimer': 'disclaimer.html', '/privacy': 'privacy.html',
// Guides (evergreen pages, Marty approved 2026-11-17)
'/guides': 'guides.html', '/guides/how-it-works': 'guide-how.html', '/guides/is-it-legit': 'guide-legit.html', '/guides/free-account': 'guide-free.html', '/guides/faq': 'guide-faq.html' };
const RESERVED = new Set(['api', 'assets', 'art', 'go', 'r', 's', 'a', 'sso', 'health', 'promote', 'sitemap.xml', 'robots.txt', 'favicon.ico', 'index.php', 'my', 'boost', 'rewards', 'join', 'confirm', 'ledger', 'contract', 'admin', 'terms', 'disclaimer', 'privacy', 'how', 'tree', 'guides', 'faq']);
const challenges = new Map();
const tickets = new Map();
const srcHost = raw => { try { const u = new URL(String(raw || '')); if (!/^https?:$/.test(u.protocol)) return ''; const h = u.hostname.toLowerCase().replace(/^www\./, ''); return h === C.site || h.endsWith('.' + C.site) || !h.includes('.') ? '' : h.slice(0, 80); } catch (e) { return ''; } };
@@ -229,7 +231,8 @@ const server = http.createServer(async (req, res) => {
if (p === '/how' || p === '/tree') { res.writeHead(301, { Location: '/#how' }); return res.end(); }
return sendFile(res, path.join(PUB, PAGES[p]), ex);
}
if (p === '/how' || p === '/tree') { res.writeHead(301, { Location: '/#' + p.slice(1) }); return res.end(); }
if (p === '/how' || p === '/faq') { res.writeHead(301, { Location: p === '/how' ? '/guides/how-it-works' : '/guides/faq' }); return res.end(); } // a real page since the Guides (2026-11-17)
if (p === '/tree') { res.writeHead(301, { Location: '/#tree' }); return res.end(); }
// an ad through a reshare link: tag the visitor with the share (last touch), then the ad page
const sm = /^\/s\/([a-z0-9]{8})\/?$/.exec(p);
if (sm) {
@@ -242,7 +245,7 @@ const server = http.createServer(async (req, res) => {
if (/^\/r\/[^/]+$/.test(p)) { res.writeHead(302, { Location: '/' + encodeURIComponent(decodeURIComponent(p.slice(3))) }); return res.end(); }
if (p === '/sitemap.xml') {
const day = new Date().toISOString().slice(0, 10);
const urls = ['/', '/rewards', '/boost', '/ledger', '/contract', '/promote', '/terms', '/disclaimer', '/privacy'].map(x => '<url><loc>https://' + C.site + x + '</loc><lastmod>' + day + '</lastmod></url>').join('');
const urls = ['/', '/guides', '/guides/how-it-works', '/guides/is-it-legit', '/guides/free-account', '/guides/faq', '/rewards', '/boost', '/ledger', '/contract', '/promote', '/terms', '/disclaimer', '/privacy'].map(x => '<url><loc>https://' + C.site + x + '</loc><lastmod>' + day + '</lastmod></url>').join('');
res.writeHead(200, headers({ 'Content-Type': 'application/xml; charset=utf-8', 'Cache-Control': 'public, max-age=3600' }));
return res.end('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + urls + '</urlset>');
}