1

In mkdocs with material theme, how I can remove credits at the bottom.

Made with Material for MkDocs

enter image description here 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.

Om Sao
  • 7,064
  • 2
  • 47
  • 61

2 Answers2

1

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

help-info.de
  • 6,695
  • 16
  • 39
  • 41
0

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.

Om Sao
  • 7,064
  • 2
  • 47
  • 61