From e361beff84a2d7e89789ba03e6ddcd37cbcb1519 Mon Sep 17 00:00:00 2001 From: dailyrandomphoto <51783821+dailyrandomphoto@users.noreply.github.com> Date: Mon, 4 Nov 2019 22:03:34 +0800 Subject: [PATCH] =?UTF-8?q?docs=EF=BC=9Aupdate=20links=20of=20sample=20cod?= =?UTF-8?q?es=20of=20'post=5Flink'=20plugin=20(#1205)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update links of sample codes of 'post_link' plugin * upate examples for all the languages --- source/docs/tag-plugins.md | 12 +++++----- source/ko/docs/tag-plugins.md | 38 ++++++++++++++++++++++++++++++++ source/pt-br/docs/tag-plugins.md | 38 ++++++++++++++++++++++++++++++++ source/ru/docs/tag-plugins.md | 38 ++++++++++++++++++++++++++++++++ source/th/docs/tag-plugins.md | 19 ++++++++++++++-- source/zh-cn/docs/tag-plugins.md | 16 ++++++++++++++ source/zh-tw/docs/tag-plugins.md | 38 ++++++++++++++++++++++++++++++++ 7 files changed, 191 insertions(+), 8 deletions(-) diff --git a/source/docs/tag-plugins.md b/source/docs/tag-plugins.md index 4894219370..156f0813a0 100644 --- a/source/docs/tag-plugins.md +++ b/source/docs/tag-plugins.md @@ -252,8 +252,8 @@ Inserts a responsive or specified size Vimeo video. Include links to other posts. ``` -{% post_path filename %} -{% post_link filename [optional text] [escape] %} +{% post_path slug %} +{% post_link slug [title] [escape] %} ``` You can ignore permalink and folder information, like languages and dates, when using this tag. @@ -283,16 +283,16 @@ For instance: **Escape title.** ``` -{% post_link hexo-4-0-released 'How to use tag in title' %} +{% post_link hexo-4-released 'How to use tag in title' %} ``` -{% post_link hexo-3-9-released 'How to use tag in title' %} +{% post_link hexo-4-released 'How to use tag in title' %} **Do not escape title.** ``` -{% post_link hexo-4-0-released 'bold custom title' false %} +{% post_link hexo-4-released 'bold custom title' false %} ``` -{% post_link hexo-3-9-released 'bold custom title' false %} +{% post_link hexo-4-released 'bold custom title' false %} ## Include Assets diff --git a/source/ko/docs/tag-plugins.md b/source/ko/docs/tag-plugins.md index 3bd74c54e8..b7de42c2e8 100644 --- a/source/ko/docs/tag-plugins.md +++ b/source/ko/docs/tag-plugins.md @@ -222,6 +222,44 @@ Vimeo video를 포함시킬 수 있습니다. {% post_link slug [title] [escape] %} ``` +You can ignore permalink and folder information, like languages and dates, when using this tag. + +For instance: `{% raw %}{% post_link how-to-bake-a-cake %}{% endraw %}`. + +This will work as long as the filename of the post is `how-to-bake-a-cake.md`, even if the post is located at `source/posts/2015-02-my-family-holiday` and has permalink `2018/en/how-to-bake-a-cake`. + +You can customize the text to display, instead of displaying the post's title. Using `post_path` inside Markdown syntax `[]()` is not supported. + +Post's title and custom text are escaped by default. You can use the `escape` option to disable escaping. + +For instance: + +**Display title of the post.** + +`{% raw %}{% post_link hexo-3-8-released %}{% endraw %}` + +{% post_link hexo-3-8-released %} + +**Display custom text.** + +`{% raw %}{% post_link hexo-3-8-released 'Link to a post' %}{% endraw %}` + +{% post_link hexo-3-8-released 'Link to a post' %} + +**Escape title.** + +``` +{% post_link hexo-4-released 'How to use tag in title' %} +``` +{% post_link hexo-4-released 'How to use tag in title' %} + +**Do not escape title.** + +``` +{% post_link hexo-4-released 'bold custom title' false %} +``` +{% post_link hexo-4-released 'bold custom title' false %} + ## Include Assets 포스트의 asset을 포함시킬 수 있습니다. diff --git a/source/pt-br/docs/tag-plugins.md b/source/pt-br/docs/tag-plugins.md index 22af9691db..ac69a5aa14 100644 --- a/source/pt-br/docs/tag-plugins.md +++ b/source/pt-br/docs/tag-plugins.md @@ -225,6 +225,44 @@ Incluir links para outras postagens. {% post_link slug [title] [escape] %} ``` +You can ignore permalink and folder information, like languages and dates, when using this tag. + +For instance: `{% raw %}{% post_link how-to-bake-a-cake %}{% endraw %}`. + +This will work as long as the filename of the post is `how-to-bake-a-cake.md`, even if the post is located at `source/posts/2015-02-my-family-holiday` and has permalink `2018/en/how-to-bake-a-cake`. + +You can customize the text to display, instead of displaying the post's title. Using `post_path` inside Markdown syntax `[]()` is not supported. + +Post's title and custom text are escaped by default. You can use the `escape` option to disable escaping. + +For instance: + +**Display title of the post.** + +`{% raw %}{% post_link hexo-3-8-released %}{% endraw %}` + +{% post_link hexo-3-8-released %} + +**Display custom text.** + +`{% raw %}{% post_link hexo-3-8-released 'Link to a post' %}{% endraw %}` + +{% post_link hexo-3-8-released 'Link to a post' %} + +**Escape title.** + +``` +{% post_link hexo-4-released 'How to use tag in title' %} +``` +{% post_link hexo-4-released 'How to use tag in title' %} + +**Do not escape title.** + +``` +{% post_link hexo-4-released 'bold custom title' false %} +``` +{% post_link hexo-4-released 'bold custom title' false %} + ## Incluir Assets Incluir assets de postagem. diff --git a/source/ru/docs/tag-plugins.md b/source/ru/docs/tag-plugins.md index d13916cb32..877c0dae0e 100644 --- a/source/ru/docs/tag-plugins.md +++ b/source/ru/docs/tag-plugins.md @@ -222,6 +222,44 @@ content {% post_link slug [title] [escape] %} ``` +You can ignore permalink and folder information, like languages and dates, when using this tag. + +For instance: `{% raw %}{% post_link how-to-bake-a-cake %}{% endraw %}`. + +This will work as long as the filename of the post is `how-to-bake-a-cake.md`, even if the post is located at `source/posts/2015-02-my-family-holiday` and has permalink `2018/en/how-to-bake-a-cake`. + +You can customize the text to display, instead of displaying the post's title. Using `post_path` inside Markdown syntax `[]()` is not supported. + +Post's title and custom text are escaped by default. You can use the `escape` option to disable escaping. + +For instance: + +**Display title of the post.** + +`{% raw %}{% post_link hexo-3-8-released %}{% endraw %}` + +{% post_link hexo-3-8-released %} + +**Display custom text.** + +`{% raw %}{% post_link hexo-3-8-released 'Link to a post' %}{% endraw %}` + +{% post_link hexo-3-8-released 'Link to a post' %} + +**Escape title.** + +``` +{% post_link hexo-4-released 'How to use tag in title' %} +``` +{% post_link hexo-4-released 'How to use tag in title' %} + +**Do not escape title.** + +``` +{% post_link hexo-4-released 'bold custom title' false %} +``` +{% post_link hexo-4-released 'bold custom title' false %} + ## Вставка материала Содержит содержимое материала. diff --git a/source/th/docs/tag-plugins.md b/source/th/docs/tag-plugins.md index 66469b7580..75fdf9f179 100644 --- a/source/th/docs/tag-plugins.md +++ b/source/th/docs/tag-plugins.md @@ -221,8 +221,8 @@ content รวมลิงก์ของโพสต์อื่นๆเข้าไปใน block: ``` -{% post_path filename %} -{% post_link filename [optional text] [escape] %} +{% post_path slug %} +{% post_link slug [title] [escape] %} ``` เวลาใช้แท็กนี้ ข้อมูล permalink และ folder เช่น ภาษาและวันเดือนปี จะถูกละเลย @@ -237,6 +237,8 @@ content จะโชว์ให้เห็นได้ดัวยการตั้งค่า `post_path` ส่วน syntax ท่ีเป็น `[]()` จะไม่สนับสนุนโดย hexo ในท่ีนี่ +Post's title and custom text are escaped by default. You can use the `escape` option to disable escaping. + ยกตัวอย่างเช่น: **โชว์หัวข้อโพสต์** @@ -251,6 +253,19 @@ content {% post_link hexo-3-8-released 'Link to a post' %} +**Escape title.** + +``` +{% post_link hexo-4-released 'How to use tag in title' %} +``` +{% post_link hexo-4-released 'How to use tag in title' %} + +**Do not escape title.** + +``` +{% post_link hexo-4-released 'bold custom title' false %} +``` +{% post_link hexo-4-released 'bold custom title' false %} ## Include Assets diff --git a/source/zh-cn/docs/tag-plugins.md b/source/zh-cn/docs/tag-plugins.md index 141661b134..21cd7111db 100644 --- a/source/zh-cn/docs/tag-plugins.md +++ b/source/zh-cn/docs/tag-plugins.md @@ -260,6 +260,8 @@ content 默认链接文字是文章的标题,你也可以自定义要显示的文本。此时不应该使用 Markdown 语法 `[]()`。 +默认对文章的标题和自定义标题里的特殊字符进行转义。可以使用`escape`选项,禁止对特殊字符进行转义。 + **链接使用文章的标题** `{% raw %}{% post_link hexo-3-8-released %}{% endraw %}` @@ -272,6 +274,20 @@ content {% post_link hexo-3-8-released '通往文章的链接' %} +**对标题的特殊字符进行转义** + +``` +{% post_link hexo-4-released 'How to use tag in title' %} +``` +{% post_link hexo-4-released 'How to use tag in title' %} + +**禁止对标题的特殊字符进行转义** + +``` +{% post_link hexo-4-released 'bold custom title' false %} +``` +{% post_link hexo-4-released 'bold custom title' false %} + ## 引用资源 引用文章的资源。 diff --git a/source/zh-tw/docs/tag-plugins.md b/source/zh-tw/docs/tag-plugins.md index d6c2553145..9148b7e74b 100644 --- a/source/zh-tw/docs/tag-plugins.md +++ b/source/zh-tw/docs/tag-plugins.md @@ -218,6 +218,44 @@ content {% post_link slug [title] [escape] %} ``` +You can ignore permalink and folder information, like languages and dates, when using this tag. + +For instance: `{% raw %}{% post_link how-to-bake-a-cake %}{% endraw %}`. + +This will work as long as the filename of the post is `how-to-bake-a-cake.md`, even if the post is located at `source/posts/2015-02-my-family-holiday` and has permalink `2018/en/how-to-bake-a-cake`. + +You can customize the text to display, instead of displaying the post's title. Using `post_path` inside Markdown syntax `[]()` is not supported. + +Post's title and custom text are escaped by default. You can use the `escape` option to disable escaping. + +For instance: + +**Display title of the post.** + +`{% raw %}{% post_link hexo-3-8-released %}{% endraw %}` + +{% post_link hexo-3-8-released %} + +**Display custom text.** + +`{% raw %}{% post_link hexo-3-8-released 'Link to a post' %}{% endraw %}` + +{% post_link hexo-3-8-released 'Link to a post' %} + +**Escape title.** + +``` +{% post_link hexo-4-released 'How to use tag in title' %} +``` +{% post_link hexo-4-released 'How to use tag in title' %} + +**Do not escape title.** + +``` +{% post_link hexo-4-released 'bold custom title' false %} +``` +{% post_link hexo-4-released 'bold custom title' false %} + ## 引用資產 引用文章的資產。