Skip to content

Commit

Permalink
Merge pull request #9172 from webknjaz/docs/unreleased-change-fragmen…
Browse files Browse the repository at this point in the history
…ts-preview

Add a preview for the "next release" change notes
  • Loading branch information
pradyunsg authored Dec 26, 2020
2 parents a48ad53 + 0ddfe08 commit c383ec3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/html/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import glob
import os
import pathlib
import re
import sys

Expand All @@ -34,6 +35,7 @@
'sphinx.ext.intersphinx',
# third-party:
'sphinx_inline_tabs',
'sphinxcontrib.towncrier',
# in-tree:
'docs_feedback_sphinxext',
'pip_sphinxext',
Expand Down Expand Up @@ -314,3 +316,10 @@ def to_document_name(path, base_dir):
'What content was useful?',
'What content was not useful?',
)

# -- Options for towncrier_draft extension -----------------------------------

towncrier_draft_autoversion_mode = 'draft' # or: 'sphinx-release', 'sphinx-version'
towncrier_draft_include_empty = True
towncrier_draft_working_directory = pathlib.Path(docs_dir).parent
# Not yet supported: towncrier_draft_config_path = 'pyproject.toml' # relative to cwd
2 changes: 2 additions & 0 deletions docs/html/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ Changelog
Major and minor releases of pip also include changes listed within
prior beta releases.

.. towncrier-draft-entries:: |release|, unreleased as on

.. include:: ../../NEWS.rst
1 change: 1 addition & 0 deletions news/9172.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Render the unreleased pip version change notes on the news page in docs.
1 change: 1 addition & 0 deletions tools/requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
sphinx == 3.2.1
furo
sphinx-inline-tabs
sphinxcontrib-towncrier

# `docs.pipext` uses pip's internals to generate documentation. So, we install
# the current directory to make it work.
Expand Down

0 comments on commit c383ec3

Please sign in to comment.