Changing the logo and icons¶
When installing Material for MkDocs, you immediately get access to over 8.000 icons ready to be used for customization of specific parts of the theme and/or when writing your documentation in Markdown. Not enough? You can also add additional icons with minimal effort.
The logo can be changed to a user-provided image (any type, incl.
*.svg) located in the
docs folder, or to any icon bundled with the theme. Add the following lines to
Enter a few keywords to find the perfect icon using our icon search and click on the shortcode to copy it to your clipboard:
Normally, the logo in the header and sidebar links to the homepage of the documentation, which is the same as
site_url. This behavior can be changed with the following configuration:
The favicon can be changed to a path pointing to a user-provided image, which must be located in the
docs folder. Add the following lines to
In order to use custom icons, extend the theme and create a new folder named
.icons in the
custom_dir you want to use for overrides. Next, add your
*.svg icons into a subfolder of the
.icons folder. Let's say you downloaded and unpacked the Bootstrap icon set, and want to add it to your project documentation. The structure of your project should look like this:
Then, add the following lines to
You can now use all Bootstrap icons.