Currently getting this error building the latest version - as in the
Debian git package.
Possibly this is because we depend on a package that needs updating -
mostly likely mkdocs or jinja2 - but wonder which one? Maybe we should
just update both anyway.
# Build the HTML documentation.
mkdir /<>/docs.debian
LC_ALL=C.UTF-8 PYTHONPATH=/usr/share/mkdocs/themes mkdocs build && mv site
docs.debian/html
INFO- Building documentation to directory: /<>/site
Traceback (most recent call last):
File "/usr/bin/mkdocs", line 9, in
load_entry_point('mkdocs==0.15.3', 'console_scripts', 'mkdocs')()
File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3/dist-packages/mkdocs/__main__.py", line 137, in
build_command
), clean_site_dir=clean)
File "/usr/lib/python3/dist-packages/mkdocs/commands/build.py", line 290, in
build
build_pages(config)
File "/usr/lib/python3/dist-packages/mkdocs/commands/build.py", line 234, in
build_pages
build_template('404.html', env, config, site_navigation)
File "/usr/lib/python3/dist-packages/mkdocs/commands/build.py", line 149, in
build_template
output_content = template.render(context)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in
render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in
handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/<>/docs_theme/404.html", line 1, in top-level template
code
{% extends "main.html" %}
File "/<>/docs_theme/main.html", line 7, in top-level template
code
{% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name
}}
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 430, in
getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'page' is undefined
--
Brian May