Skip to content

[codex] Use gallery title mappings for item pages#360

Draft
EltonChang1 wants to merge 1 commit into
holoviz-dev:mainfrom
EltonChang1:codex/use-gallery-title-mapping
Draft

[codex] Use gallery title mappings for item pages#360
EltonChang1 wants to merge 1 commit into
holoviz-dev:mainfrom
EltonChang1:codex/use-gallery-title-mapping

Conversation

@EltonChang1

Copy link
Copy Markdown

Closes #353.

What changed

  • Added shared title resolution for generated gallery item pages.
  • generate_pyodide_markdown and generate_item_rst now use the gallery titles mapping before falling back to filename-derived titles.
  • Added regression coverage for Markdown and RST item generation using the Panel-style Vega -> Altair & Vega title override.

Why

Gallery cards already honor nbsite_gallery_conf["galleries"][...]["titles"], but generated item page headings and sidebar entries were still derived only from filenames. This made Panel pages such as Vega render as Vega instead of Altair & Vega.

Validation

  • .venv/bin/python -m pytest nbsite/tests/test_gallery.py -q
  • .venv/bin/python -m pytest nbsite/tests/test_gallery.py nbsite/tests/test_util.py -q
  • git diff --check

Limitations

I ran focused tests for the changed generator paths rather than the full site build.

AI disclosure

This draft PR was prepared with assistance from OpenAI Codex/ChatGPT. The code, tests, validation commands, and PR text were AI-assisted and reviewed in the local checkout before submission.

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.

Gallery titles mapping not used for page titles and sidebar

1 participant