Commit c7ee6b7
committed
Fix Google Search Console indexing issues for spdlearn.org
Two root causes were preventing proper indexing:
1. Sitemap URLs had a broken `en/0.1/` prefix (all 179 pages returned 404).
sphinx_sitemap defaults to `{lang}{version}{link}` which doesn't match our
single-version deployment at root. Fixed by setting `sitemap_url_scheme = "{link}"`.
2. Homepage canonical tag included `index.html` (`https://spdlearn.org/index.html`),
causing Google to override it with `https://spdlearn.org/`. Added a Sphinx
`html-page-context` hook to strip the trailing `index.html` from canonical URLs.1 parent 46d7160 commit c7ee6b7
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
| |||
549 | 553 | | |
550 | 554 | | |
551 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
0 commit comments