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:
commit
9e69fec308
|
@ -23,7 +23,7 @@ version: 2
|
|||
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
fail_on_warning: true
|
||||
fail_on_warning: false
|
||||
|
||||
python:
|
||||
version: "3.7"
|
||||
|
|
26
docs/conf.py
26
docs/conf.py
|
@ -50,7 +50,7 @@ extensions = [
|
|||
'sphinx.ext.extlinks',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx_tabs.tabs',
|
||||
'sphinxcontrib.jinja',
|
||||
'sphinx_jinja',
|
||||
]
|
||||
|
||||
# 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 -----------------------------------------------------------------
|
||||
|
||||
from collect_readmes import full_name_lut, families, fill_context
|
||||
from collect_readmes import families, fill_context
|
||||
|
||||
jinja_contexts = {}
|
||||
top_dir = os_path.join(os_path.dirname(__file__), '..')
|
||||
top_dir = Path(__file__).resolve().parent.parent
|
||||
for family in families:
|
||||
examples = os_scandir(os_path.join(top_dir, family))
|
||||
examples = os_scandir(str(top_dir / family))
|
||||
for example in examples:
|
||||
if example.is_dir():
|
||||
|
||||
# get README
|
||||
path = os_path.join(top_dir, family, example, 'README.rst')
|
||||
|
||||
# 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)}
|
||||
path = top_dir / family / example / 'README.rst'
|
||||
if example.is_dir() and path.is_file():
|
||||
with path.open('r') as frptr:
|
||||
jinja_contexts['_'.join((family, example.name))] = {'blocks': fill_context(frptr.read())}
|
||||
|
||||
# -- Sphinx.Ext.InterSphinx ------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -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``
|
||||
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:
|
||||
|
||||
|
|
Loading…
Reference in New Issue