Skip to content

Fix/whats new page generation#697

Merged
cvanelteren merged 4 commits intomainfrom
fix/whats-new-page-generation
Apr 17, 2026
Merged

Fix/whats new page generation#697
cvanelteren merged 4 commits intomainfrom
fix/whats-new-page-generation

Conversation

@cvanelteren
Copy link
Copy Markdown
Collaborator

@cvanelteren cvanelteren commented Apr 16, 2026

Closes #695

<details> <summary> blocks with code cause escape behavior with the current pipeline to convert the release pages to show on the RTD docs. This replaces it with raw html paging.

…ly renders the modern release bodies. Recent releases (v2.1.5 onwards) embed `<details><summary>` snippet blocks containing fenced Python code, and the previous m2r2 (markdown -> RST) pipeline pasted those code fences into `.. raw:: html` directives unchanged, so Sphinx surfaced literal backticks instead of syntax-highlighted snippets and re-declared the `:raw-html-m2r:` role on every release. The script now converts each release body to HTML via the `markdown` package (with `fenced_code`, `tables`, `attr_list`, and `md_in_html` extensions), strips the trailing `by @user in PR_URL` attribution while keeping the link, demotes Markdown ATX headings by one level so the page H1 still owns the top of the hierarchy, and emits a single `.. raw:: html` block per release wrapped in `div.uplt-whats-new-release-body` for styling. The `[bot]` suffix on `@dependabot[bot]` / `@pre-commit-ci[bot]` is now part of the attribution regex. Companion CSS rules in `docs/_static/custom.css` give the wrapper sane spacing for headings, the `<details>` affordance, code blocks, and inline images. The docs optional-dependency in pyproject.toml swaps `m2r2` for `markdown`. Adds `ultraplot/tests/test_docs_fetch_releases.py` exercising the raw-HTML wrapping, title formatting, three-space indent under the directive, the regression for code fences inside `<details>`, the empty-body and empty-API edge cases, and bot-account attribution stripping.
@cvanelteren cvanelteren merged commit c748326 into main Apr 17, 2026
10 of 13 checks passed
@cvanelteren cvanelteren deleted the fix/whats-new-page-generation branch April 17, 2026 00:12
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.

What's New page is empty

1 participant