diff --git a/CHANGES/README.rst b/CHANGES/README.rst index 430437e03..c7e20ae9e 100644 --- a/CHANGES/README.rst +++ b/CHANGES/README.rst @@ -36,6 +36,9 @@ telling the readers **what changed** in a specific version of the library *since the previous version*. You should also use reStructuredText syntax for highlighting code (inline or block), linking parts of the docs or external sites. +If you wish to sign your change, feel free to add ``-- by +:user:`github-username``` at the end (replace ``github-username`` +with your own!). Finally, name your file following the convention that Towncrier understands: it should start with the number of an issue or a @@ -67,20 +70,27 @@ File :file:`CHANGES/603.removal.1.rst`: .. code-block:: rst - Dropped Python 3.5 support; Python 3.6 is the minimal supported Python version. + Dropped Python 3.5 support; Python 3.6 is the minimal supported Python + version -- by :user:`webknjaz`. File :file:`CHANGES/550.bugfix.rst`: .. code-block:: rst - Started shipping Windows wheels for the x86 architecture. + Started shipping Windows wheels for the x86 architecture + -- by :user:`Dreamsorcerer`. File :file:`CHANGES/553.feature.rst`: .. code-block:: rst - Added support for ``GenericAliases`` (``MultiDict[str]``) under Python 3.9 and higher. + Added support for ``GenericAliases`` (``MultiDict[str]``) under Python 3.9 + and higher -- by :user:`mjpieters`. +.. tip:: + + See :file:`pyproject.toml` for all available categories + (``tool.towncrier.type``). .. _Towncrier philosophy: https://towncrier.readthedocs.io/en/actual-freaking-docs/#philosophy diff --git a/docs/conf.py b/docs/conf.py index 64d98e2b6..bcc10de6b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,10 +51,13 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + # stdlib-party extensions: + "sphinx.ext.extlinks", "sphinx.ext.intersphinx", "sphinx.ext.coverage", "sphinx.ext.doctest", "sphinx.ext.viewcode", + # Third-party extensions: "alabaster", ] @@ -88,9 +91,17 @@ # The master toctree document. master_doc = "index" -# General information about the project. -project = "yarl" -copyright = "2016-2018, Andrew Svetlov and aio-libs team" +# -- Project information ----------------------------------------------------- + +github_url = "https://github.com" +github_repo_org = "aio-libs" +github_repo_name = "yarl" +github_repo_slug = f"{github_repo_org}/{github_repo_name}" +github_repo_url = f"{github_url}/{github_repo_slug}" +github_sponsors_url = f"{github_url}/sponsors" + +project = github_repo_name +copyright = f"2016, Andrew Svetlov, {project} contributors and aio-libs team" author = "Andrew Svetlov and aio-libs team" # The version info for the project you're documenting, acts as replacement for @@ -154,6 +165,17 @@ # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False +# -- Extension configuration ------------------------------------------------- + +# -- Options for extlinks extension --------------------------------------- +extlinks = { + "issue": (f"{github_repo_url}/issues/%s", "#%s"), + "pr": (f"{github_repo_url}/pull/%s", "PR #%s"), + "commit": (f"{github_repo_url}/commit/%s", "%s"), + "gh": (f"{github_url}/%s", "GitHub: %s"), + "user": (f"{github_sponsors_url}/%s", "@%s"), +} + # -- Options for HTML output ----------------------------------------------