← back to Rentv
Public polish: hide all admin nav links from public + SEO for /map
88858d335ac751d605f25435c62e5a940b50f35e · 2026-08-06 09:41:31 -0700 · Steve Abrams
- Hide-admin-nav CSS now covers /desk + every internal path (backend/audience/social/
consulting/press/admin/versions/forsale/summit-leads/...) so public visitors see zero
dead admin links (was leaking the Broker & Owner Desk link on the front page).
- sitemap.xml: drop admin-gated /deals (was a crawler login-redirect), add /map /markets
/review + per-article /news/:id entries for indexing.
- map.html: OpenGraph + Twitter Card tags + canonical + a 1200x630 share image so the
public map link renders a rich preview when shared.
TK-10284
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
A public/img/map-og.jpgM public/map.htmlM server.js
Diff
commit 88858d335ac751d605f25435c62e5a940b50f35e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Aug 6 09:41:31 2026 -0700
Public polish: hide all admin nav links from public + SEO for /map
- Hide-admin-nav CSS now covers /desk + every internal path (backend/audience/social/
consulting/press/admin/versions/forsale/summit-leads/...) so public visitors see zero
dead admin links (was leaking the Broker & Owner Desk link on the front page).
- sitemap.xml: drop admin-gated /deals (was a crawler login-redirect), add /map /markets
/review + per-article /news/:id entries for indexing.
- map.html: OpenGraph + Twitter Card tags + canonical + a 1200x630 share image so the
public map link renders a rich preview when shared.
TK-10284
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
public/img/map-og.jpg | Bin 0 -> 149178 bytes
public/map.html | 13 +++++++++++++
server.js | 7 +++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/public/img/map-og.jpg b/public/img/map-og.jpg
new file mode 100644
index 00000000..3966383b
Binary files /dev/null and b/public/img/map-og.jpg differ
diff --git a/public/map.html b/public/map.html
index 419262e1..8f914e1b 100644
--- a/public/map.html
+++ b/public/map.html
@@ -1,6 +1,19 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>News Map — RENTV.com</title>
<meta name="description" content="Every RENTV commercial real estate story on the map. Turn on your location to see the news around you — green pins are from the last three months, red pins are older.">
+<link rel="canonical" href="https://rentv.agentabrams.com/map">
+<meta property="og:type" content="website">
+<meta property="og:site_name" content="RENTV.com">
+<meta property="og:title" content="RENTV News Map — CRE news around you">
+<meta property="og:description" content="Every RENTV commercial real estate story on the map. Turn on location to see the news around you — green pins are the last 3 months, red are older.">
+<meta property="og:url" content="https://rentv.agentabrams.com/map">
+<meta property="og:image" content="https://rentv.agentabrams.com/img/map-og.jpg">
+<meta property="og:image:width" content="1200">
+<meta property="og:image:height" content="630">
+<meta name="twitter:card" content="summary_large_image">
+<meta name="twitter:title" content="RENTV News Map — CRE news around you">
+<meta name="twitter:description" content="Every RENTV commercial real estate story on the map — green pins are the last 3 months, red are older.">
+<meta name="twitter:image" content="https://rentv.agentabrams.com/img/map-og.jpg">
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;600;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css">
diff --git a/server.js b/server.js
index c5f5e40e..75979425 100644
--- a/server.js
+++ b/server.js
@@ -220,7 +220,7 @@ function sendPage(res, absFile) {
// hide their nav links from user-tier so the front page shows no dead links (zero-flash,
// server-rendered off req.role — no dependency on JS or per-page nav edits).
if (res.req && res.req.role !== 'admin' && html.indexOf('rentv-hide-admin-nav') === -1) {
- const hideCss = '<style id="rentv-hide-admin-nav">a[href^="/la-commercial"],a[href^="/pulse"],a[href^="/sector"],a[href^="/hub"],a[href^="/brief"],a[href^="/closings"],a[href^="/deals"]{display:none!important}</style>';
+ const hideCss = '<style id="rentv-hide-admin-nav">a[href^="/la-commercial"],a[href^="/pulse"],a[href^="/sector"],a[href^="/hub"],a[href^="/brief"],a[href^="/closings"],a[href^="/deals"],a[href^="/desk"],a[href^="/backend"],a[href^="/audience"],a[href^="/social"],a[href^="/consulting"],a[href^="/press"],a[href^="/admin"],a[href^="/versions"],a[href^="/forsale"],a[href^="/summit-leads"],a[href^="/news-playbook"],a[href^="/re-search"]{display:none!important}</style>';
html = html.indexOf('</head>') !== -1 ? html.replace('</head>', hideCss + '</head>') : hideCss + html;
}
res.type('html').send(html);
@@ -1367,9 +1367,12 @@ app.get('/robots.txt', (req, r) => {
app.get('/sitemap.xml', (req, r) => {
const base = (req.protocol + '://' + req.get('host')).replace(/\/$/, '');
const items = newsItems();
- const urls = ['/', '/topics', '/deals', '/blog'];
+ // Public, crawlable pages only — /deals is admin-gated now (was leaking a login redirect to crawlers).
+ const urls = ['/', '/map', '/markets', '/review', '/topics', '/blog'];
(readHubs().hubs || []).forEach(h => { if (hubMatches(h, items).length > 0) urls.push('/topic/' + h.slug); });
(readRegions().regions || []).forEach(reg => { if (regionMatches(reg, items).length > 0) urls.push('/region/' + reg.slug); });
+ // Article-level entries for the live news feed so stories are individually indexable.
+ (Array.isArray(items) ? items : []).forEach(it => { if (it && it.id) urls.push('/news/' + it.id); });
const body = urls.map(u => ` <url><loc>${base}${u}</loc></url>`).join('\n');
r.type('application/xml').send(`<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n${body}\n</urlset>\n`);
});
← a3ed3e45 PR intel (a): clean client login — server delegates PR surfa
·
back to Rentv
·
PR intel (a): also delegate the no-trailing-slash /admin/pr- f6e1cf9d →