Repository navigation
Replace page.is_homepage with a builder-portable homepage check in every overrides/main.html #71
Description
Activity
- addedready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
on Sep 6, 2026 Status check on 2026-09-06, scanning
overrides/main.htmlacross all 28 org repos via the contents API rather than the four listed above. The scope in the body is off in both directions.Seven repos ship an
overrides/main.html, not four. Missing from the list:semvertag,httpware,faststream-redis-timers. All three still usepage.is_homepage.Two of the four listed are already done:
modern-python/.github— donemodern-python/modern-di— done, landed as02e9cf7
faststream-outboxis done but unpushed. The change is written and committed as9571ce6("chore(docs): use a builder-portable homepage check in the override template") on achore/portable-homepage-checkbranch that has not been pushed. It reads as stale from the API. Push or open the PR rather than redoing it.Actually remaining: four repos, and they are the same edit four times.
lite-bootstrap,semvertag,httpwareandfaststream-redis-timerseach have exactly one occurrence, at line 6, and the line is byte-identical in all four:{% set title = (page.title ~ ' · ' ~ config.site_name) if (page.title and not page.is_homepage) else config.site_name %}
That is the
htmltitleshape, the same one.githubhad at L8, not theextraheadog/twitter shape the body describes forfaststream-outboxandlite-bootstrap. Solite-bootstrapis listed under the wrong shape above. Whoever picks this up should apply one substitution to four files, not derive four bespoke fixes.The
nav.homepage andguard note in the body still applies, and the verification step (home page<title>byte-identical before and after, plus one non-home page) is unchanged.Nothing here touches the Zensical reasoning or the #60 relationship, both of which still read correctly.
Done in all four repos, each landing only
overrides/main.html:- chore(docs): use a builder-portable homepage check in the override template #76 (634840a)
- chore(docs): use a builder-portable homepage check in the override template faststream-outbox#167 (3e952cd)
- chore(docs): use a builder-portable homepage check in the override template modern-di#455 (0e3a8c5)
- chore(docs): use a builder-portable homepage check in the override template lite-bootstrap#170 (04bec8b)
page.is_homepageis gone from every override template, replaced bynav.homepage and page.url == nav.homepage.url. Each was verified by building the site withmkdocs build --strictbefore and after and diffing the output recursively: byte-identical in all four, so this is a no-op under MkDocs today.The underlying gap stays open as item 3 of #60's revisit trigger: Zensical still exposes no documented template context, and
nav.homepageis read from its source rather than its docs.This was generated by AI during triage.
Follow-up — 2026-09-15
The 2026-09-06 closing note ("
page.is_homepageis gone from every override template") was true for the four repos in scope then, but three repos gained anoverrides/main.htmlafterwards with the samehtmltitle-shape line at L6. Found while re-running the #60 gate check.Same substitution as lite-bootstrap#170, one PR per repo, each verified by a
mkdocs build --strictbefore/after diff (byte-identical output):- chore(docs): use a builder-portable homepage check in the override template httpware#126 — merged (293467e)
- chore(docs): use a builder-portable homepage check in the override template semvertag#70 — merged (aac000f)
- chore(docs): use a builder-portable homepage check in the override template faststream-redis-timers#76 — open; docs and tests green, lint red from unrelated ty drift on main (CI runs
uv lock --upgradeand resolved ty 0.0.81 against a lockfile pinned to 0.0.78; twoty: ignore[unknown-argument]comments are now reported unused). Being fixed separately; chore(docs): use a builder-portable homepage check in the override template #76 merges once lint is green.
After #76 lands,
page.is_homepageis gone from all seven override templates in the org.that-dependshas amkdocs.ymlbut no override, so nothing to do there.This was generated by AI during triage.
modern-python/faststream-redis-timers#76 merged as 716e038 after the ty drift was fixed in faststream-redis-timers#77.
page.is_homepageis now gone from all seven override templates.
Spun off from #60 (Zensical revisit check, 2026-09-06). Worth doing on its own schedule — it is
correct under MkDocs today and independent of whether we ever port.
What
In the four repos that ship an
overrides/main.html, replacepage.is_homepagewith a homepagecheck both builders expose:
modern-python/.github—overrides/main.html, twice:htmltitle(L8) andextrahead(L25)modern-python/faststream-outbox—overrides/main.htmlL6,extrahead, og/twitter titlemodern-python/modern-di— same shape, L6modern-python/lite-bootstrap— same shape, L6The
nav.homepage andguard matters: MkDocs types itPage | None.Why
page.is_homepageis a MkDocsPageproperty with no Zensical equivalent. At Zensical 0.0.59,grep -rn is_homepageoverzensical/zensicalreturns nothing, and the render context built incrates/zensical/src/structure/page.rsexposes onlyurl,canonical_url,edit_url,path,title,meta,content,toc,ancestors,previous_page,next_page.It fails silently, not loudly — Zensical's own bundled theme (
zensical/uisrc/base.htmlL89,tag
v0.0.27) still referencespage.is_homepage, which resolves undefined → falsy. Under Zensicaltoday every one of these templates would emit a wrong
og:title/twitter:titleon its home page,and
.githubwould additionally emit a doubled<title>— the exact bug the 2026-07 spike paperedover.
nav.homepageis exposed by both builders:homepage: Page | None, "The page object for the homepage of the site":https://www.mkdocs.org/dev-guide/themes/
NAVIGATION_FIELDS = ["items", "homepage", "hash"]incrates/zensical/src/structure/nav/view.rsL38, resolved at L161–163 by serializingnavigation.homepage(aNavigationItem, which carriesurl)Caveat, stated so it is not rediscovered: the MkDocs half is documented; the Zensical half is
read from source, not from docs — Zensical publishes no template-context reference at all. Re-verify
at port time.
Non-goals
Not a migration. #60 stays open and stays blocked on
exclude_docsandvalidation.omitted_files;this change does not depend on it and should not wait for it.
Verification
Per repo: build the docs, and confirm the home page's
<title>,og:titleandtwitter:titlearebyte-identical before and after, plus one non-home page unchanged. Every affected repo already runs
mkdocs build --strictin CI.Four PRs, one per repo.