From 086a42fa8d6568caef8e9c91b3e264ee073884f8 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 23 Apr 2021 09:53:40 +0200 Subject: [PATCH] Replace `markdownextradata` with `macros` custom macros support --- docs/php/apps.md | 2 +- docs/tutorial/series/part_1.md | 2 +- docs/tutorial/series/part_2.md | 2 +- docs/tutorial/series/part_3.md | 4 ++-- docs/tutorial/series/part_4.md | 2 +- docs/tutorial/series/part_5.md | 2 +- mkdocs.yml | 8 +++----- requirements.txt | 2 +- 8 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/php/apps.md b/docs/php/apps.md index 0dc009c4..9540d5f9 100644 --- a/docs/php/apps.md +++ b/docs/php/apps.md @@ -83,5 +83,5 @@ the app identifier (`com.example.foo -> foo`) will be used instead. ### Minimum Required Files -An example project with the [source code can be found on GitHub]({jinja{ repo_url }}tree/{jinja{ edit_uri.split("/")[1] }}/snippets/tutorial/basic-app/), +An example project with the [source code can be found on GitHub]({jinja{ config.repo_url }}tree/{jinja{ config.edit_uri.split("/")[1] }}/snippets/tutorial/basic-app/), it includes everything that is required for a basic app. diff --git a/docs/tutorial/series/part_1.md b/docs/tutorial/series/part_1.md index 55e77c68..66c3eee8 100644 --- a/docs/tutorial/series/part_1.md +++ b/docs/tutorial/series/part_1.md @@ -360,4 +360,4 @@ As the menu item package installation plugin validates the given page and throws This concludes the first part of our tutorial series after which you now have a working simple package with which you can manage people in the ACP and show the visitors of your website a simple list of all created people in the front end. -The complete source code of this part can be found on [GitHub]({jinja{ repo_url }}tree/{jinja{ edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-1). +The complete source code of this part can be found on [GitHub]({jinja{ config.repo_url }}tree/{jinja{ config.edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-1). diff --git a/docs/tutorial/series/part_2.md b/docs/tutorial/series/part_2.md index 38a13c83..5cc3bef0 100644 --- a/docs/tutorial/series/part_2.md +++ b/docs/tutorial/series/part_2.md @@ -192,4 +192,4 @@ The only relevant difference between the `package.xml` file of the base page fro This concludes the second part of our tutorial series after which you now have extended the base package using event listeners and template listeners that allow you to enter the birthday of the people. -The complete source code of this part can be found on [GitHub]({jinja{ repo_url }}tree/{jinja{ edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-2). +The complete source code of this part can be found on [GitHub]({jinja{ config.repo_url }}tree/{jinja{ config.edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-2). diff --git a/docs/tutorial/series/part_3.md b/docs/tutorial/series/part_3.md index b1888625..be817748 100644 --- a/docs/tutorial/series/part_3.md +++ b/docs/tutorial/series/part_3.md @@ -71,7 +71,7 @@ The complete package will have the following file structure (including the files └── userGroupOption.xml ``` -!!! warning "We will not mention every code change between the first part and this part, as we only want to focus on the important, new parts of the code. For example, there is a new `Person::getLink()` method and new language items have been added. For all changes, please refer to the [source code on GitHub]({jinja{ repo_url }}tree/{jinja{ edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-3)." +!!! warning "We will not mention every code change between the first part and this part, as we only want to focus on the important, new parts of the code. For example, there is a new `Person::getLink()` method and new language items have been added. For all changes, please refer to the [source code on GitHub]({jinja{ config.repo_url }}tree/{jinja{ config.edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-3)." ## Runtime Cache @@ -187,5 +187,5 @@ The `IOnlineLocationPageHandler` interface requires two methods to be implemente This concludes the third part of our tutorial series after which each person has a dedicated page on which people can comment on the person. -The complete source code of this part can be found on [GitHub]({jinja{ repo_url }}tree/{jinja{ edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-3). +The complete source code of this part can be found on [GitHub]({jinja{ config.repo_url }}tree/{jinja{ config.edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-3). diff --git a/docs/tutorial/series/part_4.md b/docs/tutorial/series/part_4.md index 31fb74ac..4b8de6c2 100644 --- a/docs/tutorial/series/part_4.md +++ b/docs/tutorial/series/part_4.md @@ -39,7 +39,7 @@ The complete package will have the following file structure (_excluding_ unchang └── boxPersonList.tpl ``` -For all changes, please refer to the [source code on GitHub]({jinja{ repo_url }}tree/{jinja{ edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-4). +For all changes, please refer to the [source code on GitHub]({jinja{ config.repo_url }}tree/{jinja{ config.edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-4). ## Box Controller diff --git a/docs/tutorial/series/part_5.md b/docs/tutorial/series/part_5.md index eb753260..62e1be42 100644 --- a/docs/tutorial/series/part_5.md +++ b/docs/tutorial/series/part_5.md @@ -56,7 +56,7 @@ The package will have the following file structure _excluding_ unchanged files f └── userGroupOption.xml ``` -For all changes, please refer to the [source code on GitHub]({jinja{ repo_url }}tree/{jinja{ edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-5). +For all changes, please refer to the [source code on GitHub]({jinja{ config.repo_url }}tree/{jinja{ config.edit_uri.split("/")[1] }}/snippets/tutorial/tutorial-series/part-5). ## Miscellaneous diff --git a/mkdocs.yml b/mkdocs.yml index 1b8aff22..9ad0dc8c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -140,11 +140,9 @@ nav: plugins: - git-revision-date - search - - markdownextradata: - jinja_options: - block_start_string: "{jinja%" - comment_start_string: "{jinja#" - variable_start_string: "{jinja{" + - macros: + j2_comment_start_string: "{jinja#" + j2_variable_start_string: "{jinja{" markdown_extensions: - toc: diff --git a/requirements.txt b/requirements.txt index bf95042e..0079d1f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ Markdown==3.3.4 mike==1.0.0 mkdocs-git-revision-date-plugin==0.3.1 -mkdocs-markdownextradata-plugin==0.2.4 +mkdocs-macros-plugin==0.5.5 mkdocs-material==7.1.2 mkdocs==1.1.2 -- 2.20.1