Commit e089cd6
Rewrite index.html for this project — the SEO was pointing at another site
templates/index.html was inherited from the Dash Documentation Boilerplate and
had never been customised. Verified against the live deployment, not just read:
canonical https://dash-documentation-boilerplate.onrender.com
og:url https://yourdomain.com/
og:image https://yourdomain.com/assets/og-image.png (404)
og:site_name "Dash Documentation Boilerplate"
description "A modern, responsive documentation system for Dash..."
author "Your Name or Organization"
llms-txt -> the boilerplate's domain
Organization schema name "Your Organization Name"
SoftwareApplication schema price "29_000_000" USD
<link rel=icon href=/assets/favicon.ico> — file never existed, 404 per load
The canonical was the damaging one. It told search engines that every page on
leaflet.2plot.dev was a duplicate of a different site, which is how a domain
gets dropped from the index entirely.
It is now set by SCRIPT rather than statically, because this is a single-page
app: one HTML document serves every route, so any static canonical necessarily
lies about all but one page. The script also patches history.pushState /
replaceState, since Dash routes client-side and fires no event. The origin is
hard-coded so hits on dash-leaflet2.onrender.com consolidate onto the custom
domain rather than competing with it.
Also removed SEVEN static tags that duplicated Dash's own. register_page()
makes Dash emit per-page og:title, og:type, og:description, og:image and the
full twitter:* set (dash/_pages.py::_page_meta_tags) — the static copies
described the site rather than the page, so they were strictly worse. Only
og:site_name and og:url remain, being the two Dash does not emit. Confirmed
zero duplicates in the served head afterwards.
Two things left deliberately unfixed rather than faked:
* og:image / twitter:image are empty. Dash emits them regardless and no brand
image exists. An empty tag beats a URL that 404s; the template documents
exactly what to add (assets/og-image.png at 1200x630, plus image_url= in
pages/markdown.py).
* the favicon link is gone rather than repointed — Dash's favicon placeholder
already falls back to its own default when assets/favicon.ico is absent.
The noscript block and both JSON-LD blocks now describe dash-leaflet2: 26
components, MIT, Python 3.9+/Dash 4.1+, no build step, with links to the
llms.txt / sitemap / robots endpoints that work without JavaScript. Schema type
changed from SoftwareApplication to SoftwareSourceCode, which is what this
actually is, and the fictitious $29,000,000 price is gone.
72/72 checks.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 7650749 commit e089cd6
1 file changed
Lines changed: 169 additions & 208 deletions
0 commit comments