Skip to content

Commit

Permalink
Merge pull request #1398 from pallets/docs-filter-anchor
Browse files Browse the repository at this point in the history
unique links for filters, tests, globals
  • Loading branch information
davidism authored Apr 13, 2021
2 parents 414a8c4 + f61cc84 commit f04bde8
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 38 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"sphinxcontrib.log_cabinet",
"sphinx_issues",
]
autodoc_typehints = "description"
intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
issues_github_path = "pallets/jinja"

Expand Down
13 changes: 11 additions & 2 deletions docs/templates.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.. py:currentmodule:: jinja2
.. highlight:: html+jinja

Template Designer Documentation
===============================

.. highlight:: html+jinja

This document describes the syntax and semantics of the template engine and
will be most useful as reference to those creating Jinja templates. As the
template engine is very flexible, the configuration from the application can
Expand Down Expand Up @@ -1484,6 +1485,8 @@ is a bit contrived in the context of rendering a template):
List of Builtin Filters
-----------------------

.. py:currentmodule:: jinja-filters
.. jinja:filters:: jinja2.defaults.DEFAULT_FILTERS
Expand All @@ -1492,6 +1495,8 @@ List of Builtin Filters
List of Builtin Tests
---------------------

.. py:currentmodule:: jinja-tests
.. jinja:tests:: jinja2.defaults.DEFAULT_TESTS
Expand All @@ -1502,6 +1507,8 @@ List of Global Functions

The following functions are available in the global scope by default:

.. py:currentmodule:: jinja-globals
.. function:: range([start,] stop[, step])

Return a list containing an arithmetic progression of integers.
Expand Down Expand Up @@ -1625,6 +1632,8 @@ The following functions are available in the global scope by default:
Extensions
----------

.. py:currentmodule:: jinja2
The following sections cover the built-in Jinja extensions that may be
enabled by an application. An application could also provide further
extensions not covered by this documentation; in which case there should
Expand Down
45 changes: 24 additions & 21 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements/dev.in
# pip-compile ../requirements/dev.in
#
alabaster==0.7.12
# via sphinx
Expand All @@ -28,7 +28,7 @@ filelock==3.0.12
# via
# tox
# virtualenv
identify==1.5.13
identify==2.2.3
# via pre-commit
idna==2.10
# via requests
Expand All @@ -42,9 +42,9 @@ markupsafe==1.1.1
# via jinja2
mypy-extensions==0.4.3
# via mypy
mypy==0.800
# via -r requirements/typing.in
nodeenv==1.5.0
mypy==0.812
# via -r ../requirements/typing.in
nodeenv==1.6.0
# via pre-commit
packaging==20.9
# via
Expand All @@ -53,25 +53,27 @@ packaging==20.9
# sphinx
# tox
pallets-sphinx-themes==1.2.3
# via -r requirements/docs.in
pip-tools==5.5.0
# via -r requirements/dev.in
# via -r ../requirements/docs.in
pep517==0.10.0
# via pip-tools
pip-tools==6.0.1
# via -r ../requirements/dev.in
pluggy==0.13.1
# via
# pytest
# tox
pre-commit==2.10.1
# via -r requirements/dev.in
pre-commit==2.12.0
# via -r ../requirements/dev.in
py==1.10.0
# via
# pytest
# tox
pygments==2.7.4
pygments==2.8.1
# via sphinx
pyparsing==2.4.7
# via packaging
pytest==6.2.2
# via -r requirements/tests.in
pytest==6.2.3
# via -r ../requirements/tests.in
pytz==2021.1
# via babel
pyyaml==5.4.1
Expand All @@ -85,10 +87,10 @@ six==1.15.0
snowballstemmer==2.1.0
# via sphinx
sphinx-issues==1.2.0
# via -r requirements/docs.in
sphinx==2.4.4
# via -r ../requirements/docs.in
sphinx==3.5.4
# via
# -r requirements/docs.in
# -r ../requirements/docs.in
# pallets-sphinx-themes
# sphinx-issues
# sphinxcontrib-log-cabinet
Expand All @@ -101,25 +103,26 @@ sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-log-cabinet==1.0.1
# via -r requirements/docs.in
# via -r ../requirements/docs.in
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.4
# via sphinx
toml==0.10.2
# via
# pep517
# pre-commit
# pytest
# tox
tox==3.21.4
# via -r requirements/dev.in
typed-ast==1.4.2
tox==3.23.0
# via -r ../requirements/dev.in
typed-ast==1.4.3
# via mypy
typing-extensions==3.7.4.3
# via mypy
urllib3==1.26.4
# via requests
virtualenv==20.4.2
virtualenv==20.4.3
# via
# pre-commit
# tox
Expand Down
2 changes: 1 addition & 1 deletion requirements/docs.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Pallets-Sphinx-Themes
Sphinx<3
Sphinx
sphinx-issues
sphinxcontrib-log-cabinet
14 changes: 7 additions & 7 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements/docs.in
# pip-compile ../requirements/docs.in
#
alabaster==0.7.12
# via sphinx
Expand All @@ -27,8 +27,8 @@ packaging==20.9
# pallets-sphinx-themes
# sphinx
pallets-sphinx-themes==1.2.3
# via -r requirements/docs.in
pygments==2.7.4
# via -r ../requirements/docs.in
pygments==2.8.1
# via sphinx
pyparsing==2.4.7
# via packaging
Expand All @@ -39,10 +39,10 @@ requests==2.25.1
snowballstemmer==2.1.0
# via sphinx
sphinx-issues==1.2.0
# via -r requirements/docs.in
sphinx==2.4.4
# via -r ../requirements/docs.in
sphinx==3.5.4
# via
# -r requirements/docs.in
# -r ../requirements/docs.in
# pallets-sphinx-themes
# sphinx-issues
# sphinxcontrib-log-cabinet
Expand All @@ -55,7 +55,7 @@ sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-log-cabinet==1.0.1
# via -r requirements/docs.in
# via -r ../requirements/docs.in
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.4
Expand Down
6 changes: 3 additions & 3 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements/tests.in
# pip-compile ../requirements/tests.in
#
attrs==20.3.0
# via pytest
Expand All @@ -16,7 +16,7 @@ py==1.10.0
# via pytest
pyparsing==2.4.7
# via packaging
pytest==6.2.2
# via -r requirements/tests.in
pytest==6.2.3
# via -r ../requirements/tests.in
toml==0.10.2
# via pytest
8 changes: 4 additions & 4 deletions requirements/typing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements/typing.in
# pip-compile ../requirements/typing.in
#
mypy-extensions==0.4.3
# via mypy
mypy==0.800
# via -r requirements/typing.in
typed-ast==1.4.2
mypy==0.812
# via -r ../requirements/typing.in
typed-ast==1.4.3
# via mypy
typing-extensions==3.7.4.3
# via mypy

0 comments on commit f04bde8

Please sign in to comment.