feat(home): allow HTML format in subtitle

Signed-off-by: Khusika Dhamar Gusti <mail@khusika.com>
This commit is contained in:
Khusika Dhamar Gusti
2020-10-08 00:50:40 +07:00
parent f787a4e5ad
commit 89d344074a
2 changed files with 4 additions and 4 deletions

View File

@@ -144,7 +144,7 @@ enableEmoji = true
avatarURL = "/images/avatar.png" avatarURL = "/images/avatar.png"
# title shown in home page (HTML format is supported) # title shown in home page (HTML format is supported)
title = "" title = ""
# subtitle shown in home page # subtitle shown in home page (HTML format is supported)
subtitle = "A Clean, Elegant but Advanced Hugo Theme" subtitle = "A Clean, Elegant but Advanced Hugo Theme"
# whether to use typeit animation for subtitle # whether to use typeit animation for subtitle
typeit = true typeit = true
@@ -344,7 +344,7 @@ enableEmoji = true
avatarURL = "/images/avatar.png" avatarURL = "/images/avatar.png"
# 主页显示的网站标题 (支持 HTML 格式) # 主页显示的网站标题 (支持 HTML 格式)
title = "" title = ""
# 主页显示的网站副标题 # 主页显示的网站副标题 (支持 HTML 格式)
subtitle = "一个简洁、优雅且高效的 Hugo 主题" subtitle = "一个简洁、优雅且高效的 Hugo 主题"
# 是否为副标题显示打字机动画 # 是否为副标题显示打字机动画
typeit = true typeit = true
@@ -540,7 +540,7 @@ enableEmoji = true
avatarURL = "/images/avatar.png" avatarURL = "/images/avatar.png"
# title shown in home page (HTML format is supported) # title shown in home page (HTML format is supported)
title = "" title = ""
# subtitle shown in home page # subtitle shown in home page (HTML format is supported)
subtitle = "Un thème Hugo simple, élégant et efficace" subtitle = "Un thème Hugo simple, élégant et efficace"
# whether to use typeit animation for subtitle # whether to use typeit animation for subtitle
typeit = true typeit = true

View File

@@ -34,7 +34,7 @@
<div id="{{ $id }}" class="typeit"></div> <div id="{{ $id }}" class="typeit"></div>
{{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}} {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
{{- else -}} {{- else -}}
{{- . -}} {{- . | safeHTML -}}
{{- end -}} {{- end -}}
</h2> </h2>
{{- end -}} {{- end -}}