Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add a tip for checking fragments will render in Sphinx #136

Open
ncoghlan opened this issue Nov 11, 2024 · 0 comments
Open

Docs: add a tip for checking fragments will render in Sphinx #136

ncoghlan opened this issue Nov 11, 2024 · 0 comments

Comments

@ncoghlan
Copy link
Contributor

ncoghlan commented Nov 11, 2024

I just set this up myself, and it seemed like it would be generally useful enough to be worth mentioning somewhere in the scriv docs:

  1. Move the changelog.d folder under your Sphinx docs folder (so toctree directives can access it)
  2. Add a :hidden: + :glob: .. toctree:: directive somehow that renders the unreleased fragments without linking them

For example, have this in pyproject.toml:

[tool.scriv]
fragment_directory = "docs/changelog.d"

and this in the Sphinx page that includes the CHANGELOG.rst file:

.. Syntax check the changelog fragments

.. toctree::
   :hidden:
   :glob:

   changelog.d/*

.. Include the scriv-generated changelog details

.. include:: ../CHANGELOG.rst

This should also work for markdown fragments (assuming Sphinx is set up to render markdown files)

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

No branches or pull requests

1 participant