From 861350be32c785158847b9fc136ac2d0c62dc950 Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 13 May 2020 21:33:30 +0800 Subject: [PATCH] feat(home): home profile title support HTML format (#356) --- exampleSite/config.toml | 6 +++--- .../content/posts/theme-documentation-basics/index.en.md | 2 +- .../content/posts/theme-documentation-basics/index.fr.md | 2 +- .../content/posts/theme-documentation-basics/index.zh-cn.md | 2 +- layouts/partials/home/profile.html | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index aa9e0a8c..083af917 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -142,7 +142,7 @@ enableEmoji = true gravatarEmail = "" # URL of avatar shown in home page avatarURL = "/images/avatar.png" - # title shown in home page + # title shown in home page (HTML format is supported) title = "" # subtitle shown in home page subtitle = "A Clean, Elegant but Advanced Hugo Theme" @@ -342,7 +342,7 @@ enableEmoji = true gravatarEmail = "" # 主页显示头像的 URL avatarURL = "/images/avatar.png" - # 主页显示的网站标题 + # 主页显示的网站标题 (支持 HTML 格式) title = "" # 主页显示的网站副标题 subtitle = "一个简洁、优雅且高效的 Hugo 主题" @@ -538,7 +538,7 @@ enableEmoji = true gravatarEmail = "" # URL of avatar shown in home page avatarURL = "/images/avatar.png" - # title shown in home page + # title shown in home page (HTML format is supported) title = "" # subtitle shown in home page subtitle = "Un thème Hugo simple, élégant et efficace" diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index fe0e05e2..a4f6849d 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -307,7 +307,7 @@ Please open the code block below to view the complete sample configuration :(far gravatarEmail = "" # URL of avatar shown in home page avatarURL = "/images/avatar.png" - # {{< version 0.2.5 >}} title shown in home page + # {{< version 0.2.7 changed >}} title shown in home page (HTML format is supported) title = "" # subtitle shown in home page subtitle = "This is My New Hugo Site" diff --git a/exampleSite/content/posts/theme-documentation-basics/index.fr.md b/exampleSite/content/posts/theme-documentation-basics/index.fr.md index 0f5fc397..65521400 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.fr.md @@ -312,7 +312,7 @@ Please open the code block below to view the complete sample configuration :(far gravatarEmail = "" # URL of avatar shown in home page avatarURL = "/images/avatar.png" - # {{< version 0.2.5 >}} title shown in home page + # {{< version 0.2.7 changed >}} title shown in home page (HTML format is supported) title = "" # subtitle shown in home page subtitle = "This is My New Hugo Site" diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 1ea59532..2babe01f 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -310,7 +310,7 @@ hugo gravatarEmail = "" # 主页显示头像的 URL avatarURL = "/images/avatar.png" - # {{< version 0.2.5 >}} 主页显示的网站标题 + # {{< version 0.2.7 changed >}} 主页显示的网站标题 (支持 HTML 格式) title = "" # 主页显示的网站副标题 subtitle = "这是我的全新 Hugo 网站" diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index c542a948..1eb65cb0 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -23,7 +23,7 @@ {{- with $profile.title -}}

- {{- . -}} + {{- . | safeHTML -}}

{{- end -}}