2.1 KiB
Migration
Material 3.x to 4.x
-
Material for MkDocs 4.x finally fixes incorrect layout on Chinese systems. The fix includes a mandatory change of the base font-size from
10pxto20pxwhich means allremvalues needed to be updated. Within the theme,pxtoremcalculation is now encapsulated in a new function calledpx2remwhich is part of the SASS code base. -
If you use Material with custom CSS that is based on
remvalues, note that those values must now be divided by 2. Now,1.0remdoesn't map to10px, but20px. To learn more about the problem and implications, please refer to the issue in which the problem was discovered and fixed.
Material 2.x to 3.x
-
Material for MkDocs 3.x requires MkDocs 1.0 because the way paths are resolved internally changed significantly. Furthermore,
pageswas renamed tonav, so remember to adjust yourmkdocs.ymlfile. -
All extended templates should continue to work but in order to make them future-proof the
urlfilter should be introduced on all paths. Please see the official release notes for further guidance.
Material 1.x to 2.x
-
Material for MkDocs 2.x requires MkDocs 0.17.1, as this version introduced changes to the way themes can define options. The following variables inside your project's
mkdocs.ymlneed to be renamed:extra.featurebecomestheme.featureextra.palettebecomestheme.paletteextra.fontbecomestheme.fontextra.logobecomestheme.logo
-
Favicon support has been dropped by MkDocs, it must now be defined in
theme.favicon(previouslysite_favicon). -
Localization is now separated into theme language and search language. While there can only be a single language on theme-level, the search supports multiple languages which can be separated by commas. See the getting started guide for more guidance.
-
The search tokenizer can now be set through
extra.search.tokenizer.