feat(home): home profile title support HTML format (#356)

This commit is contained in:
Dillon
2020-05-13 21:33:30 +08:00
committed by GitHub
parent 0a9ec97450
commit 861350be32
5 changed files with 7 additions and 7 deletions

View File

@@ -142,7 +142,7 @@ enableEmoji = true
gravatarEmail = "" gravatarEmail = ""
# URL of avatar shown in home page # URL of avatar shown in home page
avatarURL = "/images/avatar.png" avatarURL = "/images/avatar.png"
# title shown in home page # title shown in home page (HTML format is supported)
title = "" title = ""
# subtitle shown in home page # subtitle shown in home page
subtitle = "A Clean, Elegant but Advanced Hugo Theme" subtitle = "A Clean, Elegant but Advanced Hugo Theme"
@@ -342,7 +342,7 @@ enableEmoji = true
gravatarEmail = "" gravatarEmail = ""
# 主页显示头像的 URL # 主页显示头像的 URL
avatarURL = "/images/avatar.png" avatarURL = "/images/avatar.png"
# 主页显示的网站标题 # 主页显示的网站标题 (支持 HTML 格式)
title = "" title = ""
# 主页显示的网站副标题 # 主页显示的网站副标题
subtitle = "一个简洁、优雅且高效的 Hugo 主题" subtitle = "一个简洁、优雅且高效的 Hugo 主题"
@@ -538,7 +538,7 @@ enableEmoji = true
gravatarEmail = "" gravatarEmail = ""
# URL of avatar shown in home page # URL of avatar shown in home page
avatarURL = "/images/avatar.png" avatarURL = "/images/avatar.png"
# title shown in home page # title shown in home page (HTML format is supported)
title = "" title = ""
# subtitle shown in home page # subtitle shown in home page
subtitle = "Un thème Hugo simple, élégant et efficace" subtitle = "Un thème Hugo simple, élégant et efficace"

View File

@@ -307,7 +307,7 @@ Please open the code block below to view the complete sample configuration :(far
gravatarEmail = "" gravatarEmail = ""
# URL of avatar shown in home page # URL of avatar shown in home page
avatarURL = "/images/avatar.png" 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 = "" title = ""
# subtitle shown in home page # subtitle shown in home page
subtitle = "This is My New Hugo Site" subtitle = "This is My New Hugo Site"

View File

@@ -312,7 +312,7 @@ Please open the code block below to view the complete sample configuration :(far
gravatarEmail = "" gravatarEmail = ""
# URL of avatar shown in home page # URL of avatar shown in home page
avatarURL = "/images/avatar.png" 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 = "" title = ""
# subtitle shown in home page # subtitle shown in home page
subtitle = "This is My New Hugo Site" subtitle = "This is My New Hugo Site"

View File

@@ -310,7 +310,7 @@ hugo
gravatarEmail = "" gravatarEmail = ""
# 主页显示头像的 URL # 主页显示头像的 URL
avatarURL = "/images/avatar.png" avatarURL = "/images/avatar.png"
# {{< version 0.2.5 >}} 主页显示的网站标题 # {{< version 0.2.7 changed >}} 主页显示的网站标题 (支持 HTML 格式)
title = "" title = ""
# 主页显示的网站副标题 # 主页显示的网站副标题
subtitle = "这是我的全新 Hugo 网站" subtitle = "这是我的全新 Hugo 网站"

View File

@@ -23,7 +23,7 @@
{{- with $profile.title -}} {{- with $profile.title -}}
<h1 class="home-title"> <h1 class="home-title">
{{- . -}} {{- . | safeHTML -}}
</h1> </h1>
{{- end -}} {{- end -}}