Skip to content

Commit 2fa34f7

Browse files
13791379
authored andcommitted
fix: noescape custom head & add custom content head
1 parent 609156a commit 2fa34f7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

resources/template/common/macro/common_macro.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- /* 统计代码 */ -}}
22
{{define "global.statistics"}}
3-
{{.options.blog_statistics_code}}
3+
{{noescape .options.blog_statistics_code}}
44
{{end}}
55

66
{{- /* 页脚信息 */ -}}
@@ -12,7 +12,7 @@
1212
{{- /* 页眉信息 */ -}}
1313

1414
{{define "global.custom_head"}}
15-
{{.options.blog_custom_head}}
15+
{{noescape .options.blog_custom_head}}
1616
{{end}}
1717

1818
{{- /* favicon */ -}}
@@ -26,11 +26,11 @@
2626
{{define "global.head"}}
2727
{{if .options.seo_spider_disabled }}
2828
<meta name="robots" content="none">
29-
{{else}}
29+
{{end}}
3030
<meta name="generator" content="Sonic {{.version}}"/>
3131
{{template "global.custom_head" .}}
32+
{{template "global.custom_content_head" .}}
3233
{{template "global.favicon" .}}
33-
{{end}}
3434
{{end}}}
3535

3636

resources/template/common/macro/global_macro.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{define "global.custom_content_head"}}
22
{{if or .is_post .is_sheet}}
3-
{{.options.blog_custom_content_head}}
3+
{{noescape .options.blog_custom_content_head}}
44
{{end}}
55
{{end}}
66

0 commit comments

Comments
 (0)