Reputation: 7673
In mkdocs
with material
theme, how I can remove credits at the bottom.
Made with Material for MkDocs
Is there any settings in
mkdocs.yml
for this?
Gone through documentation(https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/), couldn't find any direct way.
Upvotes: 1
Views: 1896
Reputation: 7298
You know - the footer displays a Made with Material for MkDocs notice to denote how the site was generated. The notice can be removed with the following option via mkdocs.yml
:
extra:
generator: false
Please read this before removing the generator notice (Note: I'm not connected to this project.):
The subtitle Made with Material for MkDocs hint in the footer is one of the reasons why this project is so popular, as it tells the user how the site is generated, helping new users to discover this project. Before removing please consider that you're enjoying the benefits of @squidfunk's work for free, as this project is Open Source and has a permissive license. Thousands of hours went into this project, most of them without any financial return.
Thus, if you remove this notice, please consider sponsoring the project. Thank you
Upvotes: 6
Reputation: 7673
There is no direct way to do this.
Workaround is to have below in mkdocs.yml
...
nav:
- Home:
- Room under home: index.md
- Another room under home: home.md
- About: about.md
extra_javascript:
- 'javascripts/removeCredits.js'
...
Create a file docs/javascripts/removeCredits.js
as below:
document.addEventListener("DOMContentLoaded", function() {
removeCredits();
});
function removeCredits(){
document.querySelectorAll('.md-copyright')[0].getElementsByTagName("a")[0].remove();
document.querySelectorAll('.md-copyright')[0].childNodes[1].remove();
}
**Change the indices of DOM elements as per your situation. If you are using another copyright
from mkdocs.yml
file, then DOM
will change.
Upvotes: 0