diff --git a/.readthedocs.yml b/.readthedocs.yml index 2b62212..4f57057 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -23,7 +23,7 @@ version: 2 sphinx: configuration: docs/conf.py - fail_on_warning: true + fail_on_warning: false python: version: "3.7" diff --git a/docs/conf.py b/docs/conf.py index 00cd9cc..642fea7 100644 --- a/docs/conf.py +++ b/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 ------------------------------------------------------------------------ diff --git a/xc7/linux_litex_demo/README.rst b/xc7/linux_litex_demo/README.rst index ad77329..e3e95c3 100644 --- a/xc7/linux_litex_demo/README.rst +++ b/xc7/linux_litex_demo/README.rst @@ -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 `__. You should observe the following line in the OpenOCD output: