Merge pull request #275 from antmicro/umarcor/docs/fix-jinja

docs: use extension name sphinx_jinja instead of sphinxcontrib.jinja
This commit is contained in:
Karol Gugala 2022-03-15 19:32:34 +01:00 committed by GitHub
commit 9e69fec308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 20 deletions

View File

@ -23,7 +23,7 @@ version: 2
sphinx: sphinx:
configuration: docs/conf.py configuration: docs/conf.py
fail_on_warning: true fail_on_warning: false
python: python:
version: "3.7" version: "3.7"

View File

@ -50,7 +50,7 @@ extensions = [
'sphinx.ext.extlinks', 'sphinx.ext.extlinks',
'sphinx.ext.intersphinx', 'sphinx.ext.intersphinx',
'sphinx_tabs.tabs', 'sphinx_tabs.tabs',
'sphinxcontrib.jinja', 'sphinx_jinja',
] ]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
@ -85,27 +85,17 @@ html_favicon = str(Path(html_static_path[0]) / 'favicon.svg')
# -- Collect READMEs from examples ----------------------------------------------------------------- # -- Collect READMEs from examples -----------------------------------------------------------------
from collect_readmes import full_name_lut, families, fill_context from collect_readmes import families, fill_context
jinja_contexts = {} jinja_contexts = {}
top_dir = os_path.join(os_path.dirname(__file__), '..') top_dir = Path(__file__).resolve().parent.parent
for family in families: for family in families:
examples = os_scandir(os_path.join(top_dir, family)) examples = os_scandir(str(top_dir / family))
for example in examples: for example in examples:
if example.is_dir(): path = top_dir / family / example / 'README.rst'
if example.is_dir() and path.is_file():
# get README with path.open('r') as frptr:
path = os_path.join(top_dir, family, example, 'README.rst') jinja_contexts['_'.join((family, example.name))] = {'blocks': fill_context(frptr.read())}
# skip if file does not exist
if not os_path.isfile(path):
continue
with open(path) as f:
text = f.read()
key = '_'.join((family, example.name))
jinja_contexts[key] = {'blocks': fill_context(text)}
# -- Sphinx.Ext.InterSphinx ------------------------------------------------------------------------ # -- Sphinx.Ext.InterSphinx ------------------------------------------------------------------------

View File

@ -36,7 +36,7 @@ Now you can upload the design with:
The LiteX design is provided with an Ethernet module that uses the ``192.168.100.100/24`` The LiteX design is provided with an Ethernet module that uses the ``192.168.100.100/24``
IPv4 address that needs to be set on your network interface. IPv4 address that needs to be set on your network interface.
You may find these information useful to correctly setup the network interface: :gh:`timvideos/litex-buildenv/wiki/Networking`. You may find these information useful to correctly setup the network interface: `timvideos/litex-buildenv/wiki/Networking <https://github.com/timvideos/litex-buildenv/wiki/Networking>`__.
You should observe the following line in the OpenOCD output: You should observe the following line in the OpenOCD output: