Skip to content

Commit 96e7d30

Browse files
committed
support book-title for blog
1 parent ce01c69 commit 96e7d30

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ enableGitInfo = true
9898
# Configure the date format used on the pages
9999
# - In git information
100100
# - In blog posts
101-
# BookDateFormat = '2023.10.15'
101+
BookDateFormat = '2006/01/02'
102102

103103
# (Optional, default true) Enables search function with flexsearch,
104104
# Index is built on fly, therefore it might slowdown your website.

resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.content

+1-1
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"Target":"book.min.cdbdbf8bee42a06d96b071e52c1c574315b327ea7b5262cce5cb1c20fcbb889b.css","MediaType":"text/css","Data":{"Integrity":"sha256-zb2/i+5CoG2WsHHlLBxXQxWzJ+p7UmLM5cscIPy7iJs="}}
1+
{"Target":"book.min.e708de46a8fb53e5d61c5b4f5a338f124135857a30daa7ea95f0cfd8b8b29d1a.css","MediaType":"text/css","Data":{"Integrity":"sha256-5wjeRqj7U+XWHFtPWjOPEkE1hXow2qfqlfDP2LiynRo="}}

themes/hugo-book/assets/_main.scss

+13-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ h5 {
2929
font-weight: $body-font-weight;
3030
}
3131

32+
.book-title {
33+
text-align: center;
34+
}
35+
36+
.title {
37+
margin-top: 0;
38+
}
39+
40+
.author {
41+
font-weight: 300;
42+
}
43+
3244
a {
3345
text-decoration: none;
3446
color: var(--color-link);
@@ -53,7 +65,7 @@ aside nav ul {
5365
}
5466

5567
li span {
56-
font-weight: 600;
68+
font-weight: 500;
5769
}
5870

5971
a {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{ if .Params.author }}
2+
<div class="book-title">
3+
<h1 class="title">{{ .Title }}</h1>
4+
<p class="author">
5+
{{ .Params.author }} | {{ .Params.day }}
6+
</p>
7+
</div>
8+
{{ end }}

0 commit comments

Comments
 (0)