Skip to content

Commit

Permalink
fix: 修复构建失败 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leetfs authored Oct 21, 2024
1 parent 4df6a17 commit 1999b6a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
14 changes: 6 additions & 8 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ hasCJKLanguage: true
defaultContentLanguage: zh-CN
disableKinds: [taxonomy, term, RSS]
enableRobotsTXT: true
googleAnalytics: G-DVB8ZD276Q

params:
description: Project Trans 非正式笔记

author:
name: Project Trans
url: https://project-trans.org
email: [email protected]

social:
twitter: MtFwiki
telegram: MtFwiki
author:
name: Project Trans
url: https://project-trans.org
email: [email protected]
googleAnalytics:
ID: 'G-DVB8ZD276Q'

markup:
goldmark:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- $defines := dict "MEASUREMENT_ID" (jsonify .Site.GoogleAnalytics) -}}
{{- $defines := dict "MEASUREMENT_ID" (jsonify .Site.Params.GoogleAnalytics.ID) -}}
{{- with resources.Get "gtag.ts" | js.Build (dict "defines" $defines) | minify | fingerprint }}
<script src="{{ .Permalink }}"></script>
{{- end }}
8 changes: 4 additions & 4 deletions themes/mtfwiki-blog/layouts/partials/head/jsonld.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
{{-
$publisher := dict
"@type" "Organization"
"name" .Site.Author.name
"url" .Site.Author.url
"email" .Site.Author.email
"name" .Site.Params.Author.name
"url" .Site.Params.Author.url
"email" .Site.Params.Author.email
-}}
{{-
$brand := dict
Expand All @@ -33,7 +33,7 @@
"name" .Site.Title
"url" .Site.Home.Permalink
"logo" (resources.GetMatch "favicon**").Permalink
"email" .Site.Author.email
"email" .Site.Params.Author.email
-}}
{{-
$article := dict
Expand Down
2 changes: 1 addition & 1 deletion themes/mtfwiki-blog/layouts/partials/head/resources.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
{{- with resources.Get "main.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ .Permalink }}">
{{- end }}
{{- if not .Site.IsServer }}
{{- if not hugo.IsServer }}
{{- partial "head/google-analytics" . }}
{{- end }}
2 changes: 1 addition & 1 deletion themes/mtfwiki-blog/layouts/partials/head/telegram.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{- with .Site.Social.telegram -}}
{{- with .Site.Params.telegram -}}
<meta name="telegram:channel" content="@{{ . }}">
{{- end }}
4 changes: 2 additions & 2 deletions themes/mtfwiki-blog/layouts/partials/head/twitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
{{- with .Description | default (cond .IsPage .Summary .Site.Params.description) }}
<meta name="twitter:description" content="{{ . }}">
{{- end }}
{{- with .Site.Social.twitter }}
{{- with .Site.Params.twitter }}
<meta name="twitter:site" content="@{{ . }}">
{{- end }}
{{- with .Params.twitter | default .Site.Social.twitter }}
{{- with .Params.twitter | default .Site.Params.twitter }}
<meta name="twitter:creator" content="@{{ . }}">
{{- end }}
{{- with resources.GetMatch "favicon**" }}
Expand Down

0 comments on commit 1999b6a

Please sign in to comment.