-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
block extracopyright not overriden #2508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reporting!
That's correct, that's a limitation of Jinja we completely forgot about 😅 I don't think we should add another variable in |
But it would be very simple to replace it by Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
{{ extracopyright }} and then, in {% extends "base.html" %}
{% block htmltitle %}
<title>This is a title</title>
{% endblock %}
{% set extracopyright %}
This is my extra copyright
{% endset %} It works nice, and the main advantage is that I don't have to broke the footer logic, nor froze the |
Replace the extracopyright block,which doesnt' work, by a variable `{{ extracopyright }}` that can be set e.g from `overrides/main.html` with `{% set extracopyright %} ... {% set %}`; see issue [`squidfunk#2508`](squidfunk#2508)
@squidfunk I also hit this in pi-hole/docs#491 and I agree that overriding a block is a lot easier and less work to keep in sync than the whole template, especially for people not too familiar with the syntax :) |
I merged both PRs. This will be available with the next release. |
Released as part of 7.1.1. |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
extracopyright
doesnt work for me:custom_dir: overrides
after the material theme inmkdocs.yml
overrides/main.html
file:The title works, but the
extracopyright
outputs nothing; that's because inbase.html
the blockfooter
includespartials/footer.html
and currently, includes doesn't override blocks.Is it possible to correct the templates with a variable or a macro instead of a block
extracopyright
? or a special way to import footer.html ?For instance replace the block in
footer.htm
l byor even better, define
extracopyright
in the config (likecopyright
) and so infooter.hml
it would bewithout having to write an
overrides/main.html
file.The text was updated successfully, but these errors were encountered: