Skip to content

#145 - Auto-build landing page from MkDocs snippets - #147

Merged
dleshchev merged 4 commits into
ccrozier-docs-light-themefrom
ccrozier-landing-mkdocs
Jun 11, 2026
Merged

dleshchev merged 4 commits into
ccrozier-docs-light-themefrom
ccrozier-landing-mkdocs

Conversation

@chloecrozier

@chloecrozier chloecrozier commented Jun 10, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace hand-maintained docs/index.html with MkDocs-built landing page (docs/index.md + docs/landing/*.html snippets, overrides/home.html)
  • Use Material header/tabs on the home page; remove Coming Soon tutorials/news placeholders; renumber tutorials 01–06
  • Add landing.css / landing.js, CI path for overrides/**, and pymdownx.snippets base_path fix

Stacked on #146 (ccrozier-docs-light-theme). Merge #146 first, then re-target this PR to main.

Test plan

  • mkdocs build --strict
  • python scripts/check_html_links.py site
  • python scripts/check_doc_refs.py
  • Open /daqiri/ — hero, graphic overlay, feature/example/tutorial/news cards, Material tabs
  • Confirm no Coming Soon entries; tutorials numbered 01–06

Replace hand-maintained index.html with snippet-driven index.md,
Material home template, and shared design tokens.

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
@chloecrozier
chloecrozier requested a review from RamyaGuru June 10, 2026 18:51
@greptile-apps

greptile-apps Bot commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces the hand-maintained docs/index.html with a MkDocs-built landing page driven by docs/index.md + docs/landing/*.html snippets and a Material theme override (overrides/home.html). Supporting plumbing — pymdownx.snippets base_path, the overrides/** CI path trigger, and all three doc-sync reference files — is updated consistently.

  • docs/javascripts/landing.js rewrites the overlay with a module-level overlayState object so the Escape keydown handler reads the current overlay reference dynamically (with an isConnected guard), directly resolving the stale-closure finding from the previous review thread.
  • overrides/home.html injects landing.css / landing.js only on the home page via Material's {% block styles/scripts %} override, keeping those assets off every other page.
  • Tutorials are renumbered 01–06 and all Coming Soon placeholders are removed; AGENTS.md, .claude/rules/docs-sync.md, and .greptile/rules.md are updated in the same PR to reflect the new index.md / docs/landing/ structure.

Confidence Score: 5/5

Safe to merge — purely a docs build and landing page change with no C++ library code touched.

All commits carry DCO sign-offs and follow the #145 - ... title convention. The overlay JS fix is correct: overlayState is module-level, the Escape handler reads through it dynamically, and the isConnected guard prevents stale-node misfire. The pymdownx.snippets base_path, the home.html template, and the CI path filter are all self-consistent. No source, build, or test files are modified.

No files require special attention.

Important Files Changed

Filename Overview
docs/javascripts/landing.js Overlay JS rewritten with module-level overlayState object; Escape handler now reads overlayState.overlay dynamically (fixing the stale-closure issue from the previous thread), with an isConnected guard.
overrides/home.html Minimal Material theme override: injects landing.css/landing.js only on the home page, wraps page.content in .daqiri-landing, and suppresses the Material footer. Correct use of {% block styles/scripts %} with super().
docs/index.md Replaces hand-maintained index.html with a snippet orchestrator. Front matter correctly sets template: home.html, hides nav/toc/footer, and includes all landing section fragments via pymdownx.snippets.
mkdocs.yml Adds pymdownx.snippets with base_path: [docs] and sets custom_dir: overrides. landing.css/landing.js are intentionally absent from extra_css/extra_javascript (they're injected by the home template only).
scripts/check_html_links.py Docstring updated to reference docs/index.md instead of docs/index.html; functional logic unchanged. Correctly checks only site/index.html since raw HTML href attributes in the landing page aren't validated by MkDocs strict mode.
docs/stylesheets/landing.css Landing page styles scoped to .daqiri-landing; consumes --nv-* tokens from extra.css. Theme-aware via [data-md-color-scheme="slate/default"] selectors. Overlay positioning uses --md-header-height/--md-tabs-height CSS variables.
.github/workflows/docs.yml Adds overrides/** to the CI path filter so changes to the home template correctly trigger the docs build job. Step label updated from "hand-maintained HTML" to "landing page HTML".
docs/landing/tutorials.html Tutorials renumbered 01–06, no Coming Soon placeholders. All six href targets match entries in mkdocs.yml nav.

Reviews (4): Last reviewed commit: "#145 - Fix landing layout and quick-star..." | Re-trigger Greptile

Comment thread docs/javascripts/landing.js Outdated
Comment on lines +60 to +70
if (!bound) {
document.addEventListener("keydown", function (event) {
if (
event.key === "Escape" &&
graphicOverlay.classList.contains("is-open")
) {
closeGraphicOverlay(graphicOverlay, previousFocusRef);
}
});
bound = true;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Stale graphicOverlay closure under instant navigation

The module-level bound flag prevents adding a second keydown listener on document, which is correct. However, the closure inside that listener captures graphicOverlay and previousFocusRef from the first call to initLandingGraphic. If navigation.instant is ever added to mkdocs.yml, document$.subscribe(setup) fires on each return visit to the home page, new DOM elements are created, and the click handlers on those elements are correctly re-bound — but the keydown handler still references the orphaned overlay node from the first visit. graphicOverlay.classList.contains("is-open") will always return false on a detached node, so pressing Escape silently stops working after the first navigation away from home.

The fix is to keep a mutable reference (var currentOverlay = null) that the keydown handler reads through rather than closing over a single element, or to scope the listener per-init and track removal.

Beat Material typeset link color so btn-primary keeps black text on green.

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
Fix overlay Escape handler for instant nav, update link checker docstring,
and move inline landing styles into landing.css classes.

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
@chloecrozier

Copy link
Copy Markdown
Member Author

@RamyaGuru, I added your suggestion from slack.
image
image

@dleshchev
dleshchev merged commit cdd356c into ccrozier-docs-light-theme Jun 11, 2026
3 checks passed
@chloecrozier
chloecrozier deleted the ccrozier-landing-mkdocs branch June 11, 2026 17:08
dleshchev pushed a commit that referenced this pull request Jun 11, 2026
Replace hand-maintained index.html with snippet-driven index.md, Material home template, and shared design tokens.

Clean replay of PR #147 on top of current main after PR #146 landed the light-theme work separately.

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
dleshchev added a commit that referenced this pull request Jun 11, 2026
* #145 - Auto-build landing page from MkDocs snippets

Replace hand-maintained index.html with snippet-driven index.md, Material home template, and shared design tokens.

Clean replay of PR #147 on top of current main after PR #146 landed the light-theme work separately.

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>

* #145 - Address landing page review follow-ups

Preserve the merged landing copy updates, make the header respond to light and dark themes, keep the logo and header title styling consistent, and use the full DAQIRI title in the generated docs header.

Signed-off-by: dleshchev <dleshchev@nvidia.com>

---------

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
Signed-off-by: dleshchev <dleshchev@nvidia.com>
Co-authored-by: Chloe Crozier <40836363+chloecrozier@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants