From 239f84102c374e7395cdc0a50f7b4171cc8c3e83 Mon Sep 17 00:00:00 2001 From: Elliot Ford Date: Fri, 15 Sep 2023 12:00:15 +0100 Subject: [PATCH] use markdown default template in markdown docs (#546) * use markdown default template in markdown docs * Remove site_packages from .readthedocs.yaml https://blog.readthedocs.com/drop-support-system-packages/ --------- Co-authored-by: Adi Roiban --- .readthedocs.yaml | 1 - docs/markdown.rst | 36 ++++++----------------------- src/towncrier/newsfragments/545.doc | 1 + 3 files changed, 8 insertions(+), 30 deletions(-) create mode 100644 src/towncrier/newsfragments/545.doc diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 71513bbb..146090f5 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,7 +13,6 @@ build: python: "3.11" python: - system_packages: False install: - method: pip path: . diff --git a/docs/markdown.rst b/docs/markdown.rst index a81fbbcc..7c07aa5e 100644 --- a/docs/markdown.rst +++ b/docs/markdown.rst @@ -21,7 +21,6 @@ Put the following into your ``pyproject.toml`` or ``towncrier.toml``: filename = "CHANGELOG.md" start_string = "\n" underlines = ["", "", ""] - template = "changelog.d/changelog_template.jinja" title_format = "## [{version}](https://github.com/twisted/my-project/tree/{version}) - {project_date}" issue_format = "[#{issue}](https://github.com/twisted/my-project/issues/{issue})" @@ -57,33 +56,12 @@ Put the following into your ``pyproject.toml`` or ``towncrier.toml``: -Next create the news fragment directory and the news file template: +Next create the news fragment directory: .. code-block:: console $ mkdir changelog.d -And put the following into ``changelog.d/changelog_template.jinja``: - -.. code-block:: jinja - - {% if sections[""] %} - {% for category, val in definitions.items() if category in sections[""] %} - - ### {{ definitions[category]['name'] }} - - {% for text, values in sections[""][category].items() %} - - {{ text }} {{ values|join(', ') }} - {% endfor %} - - {% endfor %} - {% else %} - No significant changes. - - - {% endif %} - - Next, create the news file with an explanatory header:: $ cat >CHANGELOG.md <