diff --git a/CHANGES.rst b/CHANGES.rst index a9e2a854..ebe9a79f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,9 +5,6 @@ Unreleased ---------- -.. DEV: Move these comments just below the "Unreleased" section when preparing a new release! -.. Start of PyPI readme - 3.7.0 (2024-05-29) ------------------ diff --git a/pyproject.toml b/pyproject.toml index bd1ddec5..319078fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,10 +70,14 @@ core-metadata-version = "2.2" [tool.hatch.metadata.hooks.fancy-pypi-readme] content-type = "text/x-rst" +# (Preview the generated readme by installing `hatch` and running +# `hatch project metadata readme` - see +# https://github.com/hynek/hatch-fancy-pypi-readme/blob/24.1.0/README.md#cli-interface) fragments = [ { path = "README.rst", start-after = ".. Start of PyPI readme\n\n" }, { text = "\n====\n\nChangelog\n=========\n\n" }, - { path = "CHANGES.rst", start-after = ".. Start of PyPI readme\n\n" }, + # Only include the first title after "Unreleased" - as well as the rest of the file + { path = "CHANGES.rst", pattern = "\nUnreleased\n-{4,}\n(?:.*?)\n([^\n]+\n-{4,}\n.*)" }, ] [tool.black]