Repository navigation
Refactor page specific template variables. - #921
Conversation
|
|
||
| No global variables were altered except `page_description`. Previously | ||
| its value was altered programicaly based on whether the current | ||
| page was the homepage. Now it simply maps to `config['site_description']`. |
There was a problem hiding this comment.
I think we should do the same thing with the config. We pass the config to the templates and a bunch of values from the config. So like you did with the others copyright would become config.copyright etc. Then we can just deprecate page_description and have people use config.site_description.
There was a problem hiding this comment.
I agree. Just trying to do this one piece at a time.
|
This looks great, I really like this approach. |
|
It was late and I was tired when I pushed this last night. I'll address the errors later today when I have some time. |
|
Sounds good. No rush. I'm happy for the config variables to be handled in a follow up (or here, I don't mind). |
Current coverage is 93.29%@@ master #921 diff @@
==========================================
Files 34 34
Lines 2577 2593 +16
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 2404 2419 +15
- Misses 173 174 +1
Partials 0 0
|
A deprecation warning is issued for all old variables and all new page specific variables are attributes of the 'page' object. Global variables are uneffected, except page_description. See the changes described in the release notes for details. Fixes mkdocs#874.
|
Looks good. I'm happy for this to land, but I'll let you do it as I'm not totally sure you didn't have any extra changes planned. |
A deprecation warning is issued for all old variables and all new
page specific variables are attributes of the 'page' object.
Global variables are uneffected, except page_description.
See the changes described in the release notes for details.
Fixes #874.