Repository navigation
Global Template vars refactor - #1026
Conversation
990191a to
0510fa2
Compare
Any template variables which mirrored a config setting have been deprecated and should be accessed via the coresponding config template variable. This resolves the rest of mkdocs#874.
|
I've cleaned up the commit history and finished the global template variable refactor. Assuming all the tests pass, this should be ready to go. The one concern I have is that three variables still exist both in the config and as global variables: site_favicon = nav.url_context.make_relative('/' + config['site_favicon'])
extra_javascript = utils.create_media_urls(nav, config['extra_javascript'])
extra_css = utils.create_media_urls(nav, config['extra_css'])So the values differ between the config settings and the template variables. I have highlighted this difference in the docs, but wanted to point it out here in case we should be doing something different. It occurs to me that we could create some sort of object (similar to the |
Templates need only include `{{ base_url }}/img/favicon.ico` and
users only need to create a file at `img/favicon.ico` in their
`docs_dir`.
Fixes mkdocs#725.
|
In light of #725 (which I had forgotten about), I just added a commit which deprecates |
This is a continuation of the work started in #921. That PR addressed the page context. This addresses the global context (see #874 for more info).
Still a lot of work to do on this. I started by rebasing #681 and gracefully deprecating
include_navandinclude_next_previousrather than removing them. I've left the individual commits for now so you can compare my changes to the original.