Skip to content

Commit

Permalink
use markdown default template in markdown docs (#546)
Browse files Browse the repository at this point in the history
* 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 <adiroiban@gmail.com>
  • Loading branch information
EFord36 and adiroiban authored Sep 15, 2023
1 parent 806bec1 commit 239f841
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 30 deletions.
1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ build:
python: "3.11"

python:
system_packages: False
install:
- method: pip
path: .
Expand Down
36 changes: 7 additions & 29 deletions docs/markdown.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Put the following into your ``pyproject.toml`` or ``towncrier.toml``:
filename = "CHANGELOG.md"
start_string = "<!-- towncrier release notes start -->\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})"
Expand Down Expand Up @@ -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 <<EOF
Expand Down Expand Up @@ -138,32 +116,32 @@ After running ``towncrier build --yes --version 1.0.0`` (you can ignore the Git
### Security
- Fixed a security issue! [#6](https://github.com/twisted/my-project/issues/6), [#7](https://github.com/twisted/my-project/issues/7)
- Fixed a security issue! ([#6](https://github.com/twisted/my-project/issues/6), [#7](https://github.com/twisted/my-project/issues/7))
### Removed
- Removed a square feature! [#4](https://github.com/twisted/my-project/issues/4)
- Removed a square feature! ([#4](https://github.com/twisted/my-project/issues/4))
### Deprecated
- Deprecated a module! [#3](https://github.com/twisted/my-project/issues/3)
- Deprecated a module! ([#3](https://github.com/twisted/my-project/issues/3))
### Added
- Added a cool feature! [#1](https://github.com/twisted/my-project/issues/1)
- Added a cool feature! ([#1](https://github.com/twisted/my-project/issues/1))
### Changed
- Changed a behavior! [#2](https://github.com/twisted/my-project/issues/2)
- Changed a behavior! ([#2](https://github.com/twisted/my-project/issues/2))
### Fixed
- Fixed a bug! [#5](https://github.com/twisted/my-project/issues/5)
- Fixed a bug! ([#5](https://github.com/twisted/my-project/issues/5))
- A fix without an issue number!
Pretty close, so this concludes this guide!
Expand Down
1 change: 1 addition & 0 deletions src/towncrier/newsfragments/545.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The markdown docs now use the default markdown template rather than a simpler custom one.

0 comments on commit 239f841

Please sign in to comment.