diff --git a/docs/blog/2021/excluding-content-from-search.md b/docs/blog/2021/excluding-content-from-search.md index 36d33c71a..064aa41ac 100644 --- a/docs/blog/2021/excluding-content-from-search.md +++ b/docs/blog/2021/excluding-content-from-search.md @@ -124,7 +124,7 @@ directive to the front matter of the respective Markdown file. The good thing is that the author now only has to check the top of the document to learn whether it is excluded or not: -``` bash +``` sh --- search: exclude: true diff --git a/docs/customization.md b/docs/customization.md index 3d4aed3f4..455f3b52c 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -260,9 +260,21 @@ very documentation in front of you. When you're finished making your changes, you can build the theme by invoking: +``` sh +npm run build # (1)! ``` -npm run build -``` + +1. While this command will build all theme files, it will skip the overrides + used in Material for MkDocs' own documentation which are not distributed + with the theme. If you forked the theme and want to build the overrides + as well, use: + + ``` + npm run build:all + ``` + + This will take longer, as now the icon search index, schema files, as + well as additional style sheet and JavaScript files are built. This triggers the production-level compilation and minification of all style sheets and JavaScript files. After the command exits, the compiled files are diff --git a/docs/reference/index.md b/docs/reference/index.md index 7cf30e5ca..528462214 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -34,7 +34,7 @@ See additional configuration options: When [Metadata] is enabled, the page title can be overridden for a document with some custom front matter. Add the following lines at the top of a Markdown file: -``` bash +``` sh --- title: Lorem ipsum dolor sit amet # (1)! --- @@ -57,7 +57,7 @@ When [Metadata] is enabled, the page description can be overridden for a document with custom front matter. Add the following lines at the top of a Markdown file: -``` bash +``` sh --- description: Nullam urna elit, malesuada eget finibus ut, ac tortor. # (1)! --- @@ -79,7 +79,7 @@ An icon can be assigned to each page, which is then rendered as part of the navigation sidebar. Ensure [Metadata] is enabled and add the following lines at the top of a Markdown file: -``` bash +``` sh --- icon: material/emoticon-happy # (1)! --- @@ -108,7 +108,7 @@ If you're using [theme extension] and created a new page template in the `overrides` directory, you can enable it for a specific page. Add the following lines at the top of a Markdown file: -``` bash +``` sh --- template: custom.html --- diff --git a/docs/setup/setting-up-navigation.md b/docs/setup/setting-up-navigation.md index 27a2480d1..f90191ed4 100644 --- a/docs/setup/setting-up-navigation.md +++ b/docs/setup/setting-up-navigation.md @@ -302,7 +302,7 @@ When [Metadata] is enabled, the navigation and/or table of contents sidebars can be hidden for a document with custom front matter. Add the following lines at the top of a Markdown file: -``` bash +``` sh --- hide: - navigation diff --git a/docs/setup/setting-up-site-analytics.md b/docs/setup/setting-up-site-analytics.md index fe34840a3..723be1f22 100644 --- a/docs/setup/setting-up-site-analytics.md +++ b/docs/setup/setting-up-site-analytics.md @@ -236,7 +236,7 @@ The following properties must be set for each rating: When [Metadata] is enabled, the [feedback widget] can be hidden for a document with custom front matter. Add the following lines at the top of a Markdown file: -``` bash +``` sh --- hide: - feedback diff --git a/docs/setup/setting-up-site-search.md b/docs/setup/setting-up-site-search.md index 4c653db97..cb77ec600 100644 --- a/docs/setup/setting-up-site-search.md +++ b/docs/setup/setting-up-site-search.md @@ -316,7 +316,7 @@ When [Metadata] is enabled, pages can be boosted in search with custom front matter, which will make them rank higher. Add the following lines at the top of a Markdown file: -``` bash +``` sh --- search: boost: 2 # (1)! @@ -341,7 +341,7 @@ When [Metadata] is enabled, pages can be excluded from search with custom front matter, removing them from the index. Add the following lines at the top of a Markdown file: -``` bash +``` sh --- search: exclude: true diff --git a/docs/setup/setting-up-tags.md b/docs/setup/setting-up-tags.md index 1a9e98177..31e012280 100644 --- a/docs/setup/setting-up-tags.md +++ b/docs/setup/setting-up-tags.md @@ -57,7 +57,7 @@ When both, the [built-in tags plugin] and [Metadata] extension are enabled, tags can be added for a document with custom front matter. Add the following lines at the top of a Markdown file: -``` bash +``` sh --- tags: - insiders @@ -113,7 +113,7 @@ While the tags are rendered above the main headline, sometimes, it might be desirable to hide them for a specific page, which can be achieved by using the [Metadata] extension: -``` bash +``` sh --- hide: - tags