Skip to content

Commit 34d4b5a

Browse files
committed
fix: loveit theme not supported v0.144.2, update title
1 parent ac656ba commit 34d4b5a

6 files changed

Lines changed: 116 additions & 109 deletions

File tree

config.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ defaultContentLanguage = "zh-cn"
1212

1313
enableGitInfo = true
1414

15-
[author]
16-
name = "Boiao Ch"
17-
email = "doubiliao@gmail.com"
18-
link = "https://liaobinbin.com"
19-
2015
[menu]
2116
[[menu.main]]
2217
weight = 1
@@ -50,6 +45,12 @@ enableGitInfo = true
5045
[outputs]
5146
home = ["HTML", "RSS", "JSON"]
5247

48+
49+
[params.author]
50+
name = "Boiao Ch"
51+
email = "doubiliao@gmail.com"
52+
link = "https://liaobinbin.com"
53+
5354
[params.comment]
5455
type = "valine"
5556

themes/LoveIt/config.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
dateFormat = "2006-01-02"
2121
# website title for Open Graph and Twitter Cards
2222
# 网站标题, 用于 Open Graph 和 Twitter Cards
23-
title = "林彡示申/Boiao Ch/Blog"
23+
title = "彬彬老司机 - 个人博客 - 技术杂谈 - 项目出海 - 独立开发者"
2424
# website description for RSS, SEO, Open Graph and Twitter Cards
2525
# 网站描述, 用于 RSS, SEO, Open Graph 和 Twitter Cards
26-
description = "Keep Focus!"
26+
description = "专注AI以及前后端相关技术,针对项目出海以及独立开发者的学习与经历分享"
2727
# website images for Open Graph and Twitter Cards
2828
# 网站图片, 用于 Open Graph 和 Twitter Cards
2929
images = []
@@ -45,13 +45,13 @@
4545
logo = ""
4646
# title name
4747
# 标题名称
48-
name = "Boiao Ch"
48+
name = "彬彬老司机 - Boiao Ch's Blog"
4949
# you can add extra information before the name (HTML format is supported), such as icons
5050
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
51-
pre = "林彡示申 /"
51+
pre = ""
5252
# you can add extra information after the name (HTML format is supported), such as icons
5353
# 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标
54-
post = "/ Blog"
54+
post = ""
5555
# whether to use typeit animation for title name
5656
# 是否为标题显示打字机动画
5757
typeit = true

themes/LoveIt/layouts/partials/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">
5858
<i class="fas fa-adjust fa-fw" aria-hidden="true"></i>
5959
</a>
60-
{{- if .Site.IsMultiLingual -}}
60+
{{- if hugo.IsMultilingual -}}
6161
<a href="javascript:void(0);" class="menu-item language" title="{{ T "selectLanguage" }}">
6262
<i class="fa fa-globe" aria-hidden="true"></i>
6363
<select class="language-select" id="language-select-desktop" onchange="location = this.value;">
@@ -149,7 +149,7 @@
149149
<a href="javascript:void(0);" class="menu-item theme-switch" title="{{ T "switchTheme" }}">
150150
<i class="fas fa-adjust fa-fw" aria-hidden="true"></i>
151151
</a>
152-
{{- if .Site.IsMultiLingual -}}
152+
{{- if hugo.IsMultilingual -}}
153153

154154
<a href="javascript:void(0);" class="menu-item" title="{{ T "selectLanguage" }}">
155155
<i class="fa fa-globe fa-fw" aria-hidden="true"></i>

themes/LoveIt/layouts/partials/init.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{{- else if eq .Params.comment false -}}
2222
{{- .Scratch.Set "comment" dict -}}
2323
{{- end -}}
24-
{{- else if eq .Site .Sites.First -}}
24+
{{- else if eq .Site .Sites.Default -}}
2525
{{- warnf "\n\nCurrent environment is \"development\". The \"comment system\", \"CDN\" and \"fingerprint\" will be disabled.\n当前运行环境是 \"development\". \"评论系统\", \"CDN\" 和 \"fingerprint\" 不会启用.\n" -}}
2626
{{- end -}}
2727

Lines changed: 88 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,94 @@
11
{{- $params := .Scratch.Get "params" -}}
22

33
<div class="post-footer" id="post-footer">
4-
<div class="post-info">
5-
<div class="post-info-line">
6-
<div class="post-info-mod">
7-
<span>
8-
{{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}}
9-
{{- dict "Date" . | T "updatedOnDate" -}}
10-
{{- if $.Site.Params.gitRepo -}}
11-
{{- with $.GitInfo -}}
12-
&nbsp;<a class="git-hash" href="{{ printf `%v/commit/%v` $.Site.Params.gitRepo .Hash }}"
13-
target="_blank"
14-
title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}">
15-
<i class="fas fa-hashtag fa-fw" aria-hidden="true"></i>{{- .AbbreviatedHash -}}
16-
</a>
17-
{{- end -}}
18-
{{- end -}}
19-
{{- end -}}
20-
</span>
21-
</div>
22-
{{- with $params.license | string -}}
23-
<div class="post-info-license">
24-
<span>
25-
{{- . | safeHTML -}}
26-
</span>
27-
</div>
28-
{{- end -}}
29-
</div>
30-
<div class="post-info-line">
31-
<div class="post-info-md">
32-
{{- if $params.linktomarkdown -}}
33-
{{- with .OutputFormats.Get "markdown" -}}
34-
<span>
35-
<a class="link-to-markdown" href="{{ .RelPermalink }}" target="_blank">
36-
{{- T "readMarkdown" -}}
37-
</a>
38-
</span>
39-
{{- end -}}
40-
{{- end -}}
41-
</div>
42-
<div class="post-info-share">
43-
<span>
44-
{{- partial "plugin/share.html" . -}}
45-
</span>
46-
</div>
47-
</div>
4+
<div class="post-info">
5+
{{- with .Site.Params.qrcode | string -}}
6+
<div class="post-info-line">
7+
<div class="post-info-qr">{{- . | safeHTML -}}</div>
488
</div>
49-
50-
<div class="post-info-more">
51-
<section class="post-tags">
52-
{{- with .Params.tags -}}
53-
<i class="fas fa-tags fa-fw" aria-hidden="true"></i>&nbsp;
54-
{{- range $index, $value := . -}}
55-
{{- if gt $index 0 }},&nbsp;{{ end -}}
56-
{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
57-
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
58-
{{- end -}}
59-
{{- end -}}
60-
</section>
61-
<section class="post-button">
62-
<span><a href="javascript:void(0);" onclick="window.history.back();">{{ T "back"
63-
}}</a></span>&nbsp;|&nbsp;<span><a href="{{ .Site.Home.RelPermalink }}">{{ T "home" }}</a></span>
64-
</section>
9+
{{- end -}}
10+
<div class="post-info-line">
11+
<div class="post-info-mod">
12+
<span>
13+
{{- with .Site.Params.dateformat | default "2006-01-02" |
14+
.Lastmod.Format -}} {{- dict "Date" . | T "updatedOnDate" -}} {{- if
15+
$.Site.Params.gitRepo -}} {{- with $.GitInfo -}} &nbsp;<a
16+
class="git-hash"
17+
href="{{ printf `%v/commit/%v` $.Site.Params.gitRepo .Hash }}"
18+
target="_blank"
19+
title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}"
20+
>
21+
<i class="fas fa-hashtag fa-fw" aria-hidden="true"></i>{{-
22+
.AbbreviatedHash -}}
23+
</a>
24+
{{- end -}} {{- end -}} {{- end -}}
25+
</span>
26+
</div>
27+
{{- with $params.license | string -}}
28+
<div class="post-info-license">
29+
<span> {{- . | safeHTML -}} </span>
30+
</div>
31+
{{- end -}}
6532
</div>
66-
67-
<div class="post-nav">
68-
{{- $prevPage := false -}}
69-
{{- $nextPage := false -}}
70-
{{- if or (.Params.prev) (.Params.next) -}}
71-
{{- with .Params.prev -}}
72-
{{- $prevPage = $.Site.GetPage . -}}
73-
{{- end -}}
74-
{{- with .Params.next -}}
75-
{{- $nextPage = $.Site.GetPage . -}}
76-
{{- end -}}
77-
{{- else -}}
78-
{{- $prevPage = .PrevInSection -}}
79-
{{- $nextPage = .NextInSection -}}
80-
{{- end -}}
81-
{{- with $prevPage -}}
82-
<a href="{{ .RelPermalink }}" class="prev" rel="prev" title="{{ .Title }}"><i class="fas fa-angle-left fa-fw"
83-
aria-hidden="true"></i>{{ .Title | emojify }}</a>
84-
{{- end -}}
85-
{{ with $nextPage }}
86-
<a href="{{ .RelPermalink }}" class="next" rel="next" title="{{ .Title }}">{{ .Title | emojify }}<i
87-
class="fas fa-angle-right fa-fw" aria-hidden="true"></i></a>
88-
{{- end -}}
33+
<div class="post-info-line">
34+
<div class="post-info-md">
35+
{{- if $params.linktomarkdown -}} {{- with .OutputFormats.Get "markdown"
36+
-}}
37+
<span>
38+
<a
39+
class="link-to-markdown"
40+
href="{{ .RelPermalink }}"
41+
target="_blank"
42+
>
43+
{{- T "readMarkdown" -}}
44+
</a>
45+
</span>
46+
{{- end -}} {{- end -}}
47+
</div>
48+
<div class="post-info-share">
49+
<span> {{- partial "plugin/share.html" . -}} </span>
50+
</div>
8951
</div>
90-
</div>
52+
</div>
53+
54+
<div class="post-info-more">
55+
<section class="post-tags">
56+
{{- with .Params.tags -}}
57+
<i class="fas fa-tags fa-fw" aria-hidden="true"></i>&nbsp; {{- range
58+
$index, $value := . -}} {{- if gt $index 0 }},&nbsp;{{ end -}} {{- $tag :=
59+
partialCached "function/path.html" $value $value | printf "/tags/%v" |
60+
$.Site.GetPage -}}
61+
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
62+
{{- end -}} {{- end -}}
63+
</section>
64+
<section class="post-button">
65+
<span
66+
><a href="javascript:void(0);" onclick="window.history.back();"
67+
>{{ T "back" }}</a
68+
></span
69+
>&nbsp;|&nbsp;<span
70+
><a href="{{ .Site.Home.RelPermalink }}">{{ T "home" }}</a></span
71+
>
72+
</section>
73+
</div>
74+
75+
<div class="post-nav">
76+
{{- $prevPage := false -}} {{- $nextPage := false -}} {{- if or
77+
(.Params.prev) (.Params.next) -}} {{- with .Params.prev -}} {{- $prevPage =
78+
$.Site.GetPage . -}} {{- end -}} {{- with .Params.next -}} {{- $nextPage =
79+
$.Site.GetPage . -}} {{- end -}} {{- else -}} {{- $prevPage = .PrevInSection
80+
-}} {{- $nextPage = .NextInSection -}} {{- end -}} {{- with $prevPage -}}
81+
<a href="{{ .RelPermalink }}" class="prev" rel="prev" title="{{ .Title }}"
82+
><i class="fas fa-angle-left fa-fw" aria-hidden="true"></i>{{ .Title |
83+
emojify }}</a
84+
>
85+
{{- end -}} {{ with $nextPage }}
86+
<a href="{{ .RelPermalink }}" class="next" rel="next" title="{{ .Title }}"
87+
>{{ .Title | emojify }}<i
88+
class="fas fa-angle-right fa-fw"
89+
aria-hidden="true"
90+
></i
91+
></a>
92+
{{- end -}}
93+
</div>
94+
</div>
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
{{- $version := .Get 0 -}}
2-
{{- $url := printf "https://github.com/dillonzq/LoveIt/releases/tag/v%v" $version -}}
3-
{{- $type := .Get 1 | default "new" | lower -}}
4-
{{- $label := T $type -}}
5-
{{- $color := cond (eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}}
6-
{{- $pathTemplate := cond .Site.IsMultiLingual (printf "svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
7-
{{- $path := printf $pathTemplate $version $type -}}
8-
{{- $resource := resources.Get "svg/version.template.svg" -}}
9-
{{- $resource = $resource | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
10-
{{- $alt := printf "LoveIt %v | %v" $label $version -}}
1+
{{- $version := .Get 0 -}} {{- $url := printf
2+
"https://github.com/dillonzq/LoveIt/releases/tag/v%v" $version -}} {{- $type :=
3+
.Get 1 | default "new" | lower -}} {{- $label := T $type -}} {{- $color := cond
4+
(eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}}
5+
{{- $pathTemplate := cond hugo.IsMultilingual (printf
6+
"svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
7+
{{- $path := printf $pathTemplate $version $type -}} {{- $resource :=
8+
resources.Get "svg/version.template.svg" -}} {{- $resource = $resource |
9+
resources.ExecuteAsTemplate $path (dict "version" $version "label" $label
10+
"color" $color) | minify -}} {{- $alt := printf "LoveIt %v | %v" $label $version
11+
-}}
1112
<a href="{{ $url }}" rel="noopener noreffer" target="_blank">
12-
{{- dict "Src" $resource.RelPermalink "Alt" $alt "Class" "version" | partial "plugin/img.html" -}}
13-
</a>
13+
{{- dict "Src" $resource.RelPermalink "Alt" $alt "Class" "version" | partial
14+
"plugin/img.html" -}}
15+
</a>

0 commit comments

Comments
 (0)