From a4c1b2391269826f1d065a4ebfcb14d1c48c26d2 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Tue, 1 Aug 2023 13:32:19 +0200 Subject: [PATCH 1/4] Updated Insiders changelog --- CHANGELOG | 8 ++++++++ docs/insiders/changelog.md | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index d8d25fec4..f1c809c25 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +mkdocs-material-9.1.21+insiders-4.38.1 (2023-08-01) + + * Improved nested serve mode for projects plugin + * Improved compat in privacy plugin with third-party plugins + * Fixed #5790: Typeset plugin ignores data-toc-label attribute + * Fixed #5778: Interplay of privacy plugin with git-revision-date-localized + * Fixed #5773: Info plugin erroring when community edition is in beta + mkdocs-material-9.1.21+insiders-4.38.0 (2023-07-29) * Added projects plugin for building nested projects diff --git a/docs/insiders/changelog.md b/docs/insiders/changelog.md index d24813ddd..8ad85f9dc 100644 --- a/docs/insiders/changelog.md +++ b/docs/insiders/changelog.md @@ -2,6 +2,14 @@ ## Material for MkDocs Insiders +### 4.38.1 August 1, 2023 { id="4.38.1" } + +- Improved nested serve mode for projects plugin +- Improved compat in privacy plugin with third-party plugins +- Fixed #5790: Typeset plugin ignores data-toc-label attribute +- Fixed #5778: Interplay of privacy plugin with git-revision-date-localized +- Fixed #5773: Info plugin erroring when community edition is in beta + ### 4.38.0 July 29, 2023 { id="4.38.0" } - Added projects plugin for building nested projects From 04b8d89baac412301e349796bec7c78cd42a8ab3 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Tue, 1 Aug 2023 14:05:13 +0200 Subject: [PATCH 2/4] Documentation --- docs/getting-started.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 68fd32e5c..783fe1dc3 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -123,16 +123,31 @@ The following plugins are bundled with the Docker image: ??? question "How to add plugins to the Docker image?" Material for MkDocs only bundles selected plugins in order to keep the size - of the official image small. If the plugin you want to use is not included, - create a `user-requirements.txt` file in the repository root with the packages - you want to install additionally, e.g.: + of the official image small. If the plugin you want to use is not included, + you can add them easily: - ``` txt title="user-requirements.txt" - mkdocs-macros-plugin==0.7.0 - mkdocs-glightbox>=0.3.1 - ``` + === "Material for MkDocs" - Next, you can build the image with the following command: + Create a `Dockerfile` and extend the official image: + + ``` Dockerfile title="Dockerfile" + FROM squidfunk/mkdocs-material + RUN pip install mkdocs-macros-plugin + RUN pip install mkdocs-glightbox + ``` + + === "Insiders" + + Clone or fork the Insiders repository, and create a file called + `user-requirements.txt` in the root of the repository. Then, add the + plugins that should be installed to the file, e.g.: + + ``` txt title="user-requirements.txt" + mkdocs-macros-plugin + mkdocs-glightbox + ``` + + Next, build the image with the following command: ``` docker build -t squidfunk/mkdocs-material . From 105b6ec17a2bdd3bc4cfb06609cc361904d54bb9 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 3 Aug 2023 19:08:28 +0200 Subject: [PATCH 3/4] Updated Insiders changelog --- CHANGELOG | 7 +++++++ docs/insiders/changelog.md | 7 +++++++ docs/setup/building-an-optimized-site.md | 22 ++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index f1c809c25..c8f403ee2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +mkdocs-material-9.1.21+insiders-4.39.0 (2023-08-01) + + * Added support for hoisting theme media files when building projects + * Added support for sorting pages on tags index for tags plugin + * Added support for adding date of last update to blog posts + * Fixed #5797: Parse error in typeset plugin (4.38.1 regression) + mkdocs-material-9.1.21+insiders-4.38.1 (2023-08-01) * Improved nested serve mode for projects plugin diff --git a/docs/insiders/changelog.md b/docs/insiders/changelog.md index 8ad85f9dc..c658a13b1 100644 --- a/docs/insiders/changelog.md +++ b/docs/insiders/changelog.md @@ -2,6 +2,13 @@ ## Material for MkDocs Insiders +### 4.39.0 August 3, 2023 { id="4.39.0" } + +- Added support for hoisting theme media files when building projects +- Added support for sorting pages on tags index for tags plugin +- Added support for adding date of last update to blog posts +- Fixed #5797: Parse error in typeset plugin (4.38.1 regression) + ### 4.38.1 August 1, 2023 { id="4.38.1" } - Improved nested serve mode for projects plugin diff --git a/docs/setup/building-an-optimized-site.md b/docs/setup/building-an-optimized-site.md index 24c1837e1..d75a9370c 100644 --- a/docs/setup/building-an-optimized-site.md +++ b/docs/setup/building-an-optimized-site.md @@ -118,6 +118,28 @@ The following configuration options are available for projects: projects_dir: path/to/folder ``` +#### Hoisting + +The following configuration options are available for hoisting: + +[`hoisting`](#+projects.hoisting){ #+projects.hoisting } + +: [:octicons-tag-24: insiders-4.39.0][Insiders] · :octicons-milestone-24: + Default: `true` – This option specifies whether the plugin should hoist all + themes files to the top-level project. If you disable this setting, each + project will have a copy of the themes files, which in general, can be + considered redundant: + + ``` yaml + plugins: + - projects: + hoisting: false + ``` + + It's generally advisable to enable hoisting, as it leads to faster + deployments and faster loading of your project's sites, because the files + are the same for all projects. + ### Built-in optimize plugin [:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } · From aae0122680fcf43de261c1713d97cdba2f2e97a0 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 3 Aug 2023 19:55:57 +0200 Subject: [PATCH 4/4] Documentation --- docs/setup/setting-up-a-blog.md | 5 ++++- docs/setup/setting-up-tags.md | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/docs/setup/setting-up-a-blog.md b/docs/setup/setting-up-a-blog.md index 08d2db59a..c400c9dd2 100644 --- a/docs/setup/setting-up-a-blog.md +++ b/docs/setup/setting-up-a-blog.md @@ -978,7 +978,7 @@ Create a new file called `hello-world.md` and add the following lines: ``` yaml --- draft: true # (1)! -date: 2022-01-31 +date: 2022-01-31 # (2)! categories: - Hello - World @@ -993,6 +993,9 @@ categories: output. [This behavior can be changed], e.g. for rendering drafts when building deploy previews. +2. You can use `date_updated` to signal when you updated a blog posts. The + date will be rendered as part of the sidebar. + When you spin up the [live preview server], you should be greeted by your first post! You'll also realize, that [archive] and [category] indexes have been automatically generated for you. diff --git a/docs/setup/setting-up-tags.md b/docs/setup/setting-up-tags.md index 921e5b897..0eaca3772 100644 --- a/docs/setup/setting-up-tags.md +++ b/docs/setup/setting-up-tags.md @@ -159,6 +159,43 @@ The following configuration options are available: tags_compare_reverse: true ``` +[`tags_pages_compare`](#+tags.tags_pages_compare){ #+tags.tags_pages_compare } + +: [:octicons-tag-24: insiders-4.39.0][Insiders] · :octicons-milestone-24: + Default: `None` – This option specifies which function to use when + comparing pages for sorting. If you wish to sort pages, use: + + === "Sort by page title" + + ``` yaml + plugins: + - tags: + tags_pages_compare: !!python/name:material.plugins.tags.page_title + ``` + + === "Sort by page URL" + + ``` yaml + plugins: + - tags: + tags_pages_compare: !!python/name:material.plugins.tags.page_url + ``` + + You can also define your own comparison function which must return a page + value (as a string) that is used for sorting, and reference it accordingly. + +[`tags_pages_compare_reverse`](#+tags.tags_pages_compare_reverse){ #+tags.tags_pages_compare_reverse } + +: [:octicons-tag-24: insiders-4.39.0][Insiders] · :octicons-milestone-24: + Default: `false` – This option specifies whether pages are sorted in reverse + order. It is mainly provided for completeness. To change direction, use: + + ``` yaml + plugins: + - tags: + tags_pages_compare_reverse: true + ``` + [`tags_allowed`](#+tags.tags_allowed){ #+tags.tags_allowed } : [:octicons-tag-24: insiders-4.25.0][Insiders] · :octicons-milestone-24: