You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a l look at #633 in which the include_next_prev config option is being deprecated (which explains why it is not documented). As noted in the last comment on that issue, users should remove the next/prev links via theme customization as discussed in #607.
@gringolalia you don't "edit" the templates, but you override them either through replacement files or through template inheritance. However, the mechanisms for doing that are not fully implemented in the current release (0.15), but will be in the next release (0.16). That release will also include extensive documentation about how to override various parts of the templates. For a preview, you can view the pending updates to the documentation here: https://github.com/mkdocs/mkdocs/blob/master/docs/user-guide/styling-your-docs.md#customizing-a-theme. Note that "Template Blocks" are completely missing from version 0.15 (they hadn't been implemented yet) and some of the other stuff has been tweaked a little since that release. In other words, those are the docs for the new upcoming features. Things currently don't work exactly that way (mostly but not quite), but its the best we have. Hopefully the next release will happen soon and everything will work as documented there.
Traceback (most recent call last):
File "/home/hasufell/.local/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/usr/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/hasufell/.local/lib/python3.9/site-packages/mkdocs/__main__.py", line 133, in serve_command
serve.serve(
File "/home/hasufell/.local/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 141, in serve
config = builder()
File "/home/hasufell/.local/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 136, in builder
build(config, live_server=live_server, dirty=dirty)
File "/home/hasufell/.local/lib/python3.9/site-packages/mkdocs/commands/build.py", line 285, in build
_build_theme_template(template, env, files, config, nav)
File "/home/hasufell/.local/lib/python3.9/site-packages/mkdocs/commands/build.py", line 108, in _build_theme_template
output = _build_template(template_name, template, files, config, nav)
File "/home/hasufell/.local/lib/python3.9/site-packages/mkdocs/commands/build.py", line 87, in _build_template
output = template.render(context)
File "/home/hasufell/.local/lib/python3.9/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/home/hasufell/.local/lib/python3.9/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/home/hasufell/.local/lib/python3.9/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "/home/hasufell/.local/lib/python3.9/site-packages/mkdocs/themes/mkdocs/404.html", line 1, in top-level template code
{% extends "base.html" %}
File "/home/hasufell/.local/lib/python3.9/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/home/hasufell/.local/lib/python3.9/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "/home/hasufell/git/ghcup-hs/docs/overrides/base.html", line 116, in template
<i class="fa fa-search"></i> {% trans %}Search{% endtrans %}
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'trans'. Jinja was looking for the following tags: 'elif' or 'else' or 'endif'. The innermost block that needs to be closed is 'if'.
Activity
waylan commentedon May 24, 2016
Have a l look at #633 in which the
include_next_prevconfig option is being deprecated (which explains why it is not documented). As noted in the last comment on that issue, users should remove the next/prev links via theme customization as discussed in #607.gringolalia commentedon Oct 1, 2016
Could you provide a quick step-by-step? I do not understand! Where are the theme files and templates located and how can I edit them? Newbie sorry.
waylan commentedon Oct 2, 2016
@gringolalia you don't "edit" the templates, but you override them either through replacement files or through template inheritance. However, the mechanisms for doing that are not fully implemented in the current release (0.15), but will be in the next release (0.16). That release will also include extensive documentation about how to override various parts of the templates. For a preview, you can view the pending updates to the documentation here: https://github.com/mkdocs/mkdocs/blob/master/docs/user-guide/styling-your-docs.md#customizing-a-theme. Note that "Template Blocks" are completely missing from version 0.15 (they hadn't been implemented yet) and some of the other stuff has been tweaked a little since that release. In other words, those are the docs for the new upcoming features. Things currently don't work exactly that way (mostly but not quite), but its the best we have. Hopefully the next release will happen soon and everything will work as documented there.
bretonio commentedon Oct 2, 2016
Looking forward to it thx!
hasufell commentedon Oct 13, 2021
Came here, because I want to remove these links as well. https://github.com/mkdocs/mkdocs/blob/master/docs/user-guide/styling-your-docs.md#customizing-a-theme is a dead link. Also saw #663 and 4a532be which I both don't understand.
oprypin commentedon Oct 13, 2021
hasufell commentedon Oct 13, 2021
That throws errors:
oprypin commentedon Oct 13, 2021
hasufell commentedon Oct 13, 2021
All I did was download
mkdocs/mkdocs/themes/mkdocs/base.html
Line 113 in e1b77ab
mkdocs serve.The theme config is this:
mkdocs version is 1.1.2.
oprypin commentedon Oct 13, 2021
oprypin commentedon Oct 13, 2021
hasufell commentedon Oct 13, 2021
Fixed it.