Skip to content

fix(docs): restore site footer after mystmd conversion#801

Merged
henryiii merged 1 commit into
mainfrom
fix-mystmd-footer
Jun 12, 2026
Merged

fix(docs): restore site footer after mystmd conversion#801
henryiii merged 1 commit into
mainfrom
fix-mystmd-footer

Conversation

@henryiii

@henryiii henryiii commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Problem

After the move to mystmd (#792), the site footer is missing and there is "no site title".

Root cause

The migration ported the footer styling (docs/assets/css/site.css has the full .footer / .outer-grid block, including the site-title h1 rule) but never ported the footer content. In the book-theme the site-wide footer is a content part wired via:

site:
  parts:
    footer: footer.md

docs/config/scientific-python.yml had no parts: section at all, so MyST rendered no <footer> element — and the site title that lives inside the footer disappeared with it. (The top-left header logo + logo_text were always rendering; the "footer-link" classes in the HTML are just the prev/next page nav, not the site footer.)

Fix

  • docs/config/scientific-python.yml — add the missing parts.footer: footer.md wiring, mirroring the upstream scientific-python-myst-theme config.
  • docs/footer.md (new) — footer content using the .outer-grid grid the CSS already expects: site-title h1, the maintainer blurb, and the Scientific Python / Learn / Source links. It starts with a MyST % comment (not a real page), so it carries <!-- rumdl-disable MD041 -->, the same inline-disable pattern already used in docs/_partials/pyproject.md.

Verification

npx myst build --html now emits a <footer> with the dark teal background, the site-title h1, the description, and the links. prek (rumdl) passes on both files.


📚 Documentation preview 📚: https://scientific-python-cookie--801.org.readthedocs.build/

The mystmd migration ported the footer styling in assets/css/site.css
(the `.footer` / `.outer-grid` rules, including the site-title heading)
but never added the footer content part. In the book-theme the
site-wide footer is a content part wired via `site.parts.footer`, which
was missing from config/scientific-python.yml — so no `<footer>` was
rendered and the site title that lives inside it disappeared.

Add docs/footer.md (site title, maintainer blurb, and links) and wire it
up with `site.parts.footer`, matching the upstream scientific-python-myst
-theme layout the CSS already expects.

Assisted-by: ClaudeCode:claude-opus-4.8
@henryiii henryiii merged commit 3295ceb into main Jun 12, 2026
8 checks passed
@henryiii henryiii deleted the fix-mystmd-footer branch June 12, 2026 04:58
@stefanv

stefanv commented Jun 12, 2026

Copy link
Copy Markdown
Member

Further notes:

  • Extra "Home" header above the main text.
  • Duplication of headers, e.g. Tutorials -> Tutorials, Intro to Development -> Intro to development
  • No Table of Contents (myst should be able to provide this via the toc directive?)
  • We'll soon merge a theme update that will make it more clear which tab is seleced in code alternatives
  • Note to self: make highlight scheme configurable, if it isn't already
  • Note to self: implement three-way theme toggle

@henryiii

Copy link
Copy Markdown
Collaborator Author

I don't understand the ToC comment, Isn't there a ToC on every page? The submenus pages have expanded in-page ToCs too, in case someone doesn't know the little arrow expands, but I don't think the main page needs one?

henryiii added a commit that referenced this pull request Jun 15, 2026
* fix(docs): remove duplicate page titles after mystmd conversion

The mystmd migration (#792) gave every page a frontmatter `title:` and
demoted the original `#` page heading to `##`. The book-theme renders the
frontmatter title as a title-block H1, so each page showed its title twice
and the landing page rendered a bare "Home" heading above the content.

Drop the redundant frontmatter `title` and promote body headings back one
level so MyST extracts the single `#` H1 as the page title. `short_title`
still drives the nav on the GHA/style pages; the index keeps a
`short_title: Home` nav label. The two packaging guides had a tip/cog block
before the heading (which blocks title extraction), so their `#` heading
moves to the top.

Resolves the "extra Home header" and "duplicated headers" review notes from
#801

Assisted-by: ClaudeCode:claude-opus-4.8

* fix(docs): demote headings in pyproject partial to nest under sections

`_partials/pyproject.md` opened with an H1 that got inlined mid-page in the
two packaging guides, which include it at the `##`-section level. Demote each
heading one level so it nests correctly, and add a `rumdl-disable MD041` since
the file now starts with an H2 (same pattern as footer.md).

Assisted-by: ClaudeCode:claude-opus-4.8
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