Skip to content

Commit f3a41f7

Browse files
committed
init
1 parent 2cc41d3 commit f3a41f7

File tree

7 files changed

+43
-42
lines changed

7 files changed

+43
-42
lines changed

config.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,13 @@
3333
appearance = "auto"
3434
back_home_text = ".."
3535
date_format = "2006-01-02"
36-
isListGroupByDate = false
36+
isListGroupByDate = true
37+
38+
[outputs]
39+
home = ["HTML", "RSS"]
40+
page = ["HTML", "RSS"]
41+
42+
[outputFormats]
43+
[outputFormats.RSS]
44+
mediatype = "application/rss+xml"
45+
baseName = "atom"

content/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ title = ""
33
date = 2022-08-25T21:30:04+08:00
44
draft = false
55
+++
6-
To edit this find file nostyleplease/content/_index.md

data/menu.toml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,40 @@
11
[[entries]]
2-
title = "info"
3-
4-
[[entries.entries]]
5-
title = "a (nearly) no-CSS, fast, minimalist Hugo theme ported from <a href='https://github.com/riggraz/no-style-please'>riggraz/no-style-please</a>."
6-
7-
[[entries.entries]]
8-
title = "github repo"
9-
url = "https://github.com/hanwenguo/hugo-theme-nostyleplease"
10-
11-
12-
[[entries]]
13-
title = "all posts"
2+
title = "thoughts"
143

154
[entries.post_list]
16-
limit = 5
5+
limit = 8
176
show_more = true
18-
show_more_text = "See archive..."
7+
show_more_text = "more.."
198
show_more_url = "posts"
209

2110
[[entries]]
22-
title = "posts by category"
11+
title = "categories"
2312

24-
[entries.post_list]
25-
section = "posts"
26-
show_more = true
27-
show_more_text = "See more posts..."
28-
show_more_url = "posts"
13+
[[entries.entries]]
14+
title = '''
15+
<a href="/categories/SRE/" target="_blank">SRE</a> /
16+
<a href="/categories/PYTHON/" target="_blank">PYTHON</a> /
17+
<a href="/categories/JAVA/" target="_blank">JAVA</a> /
18+
<a href="/categories/智能家居/" target="_blank">智能家居</a> /
19+
<a href="/categories/个人相关/" target="_blank">个人相关</a>
20+
'''
2921

3022
[[entries]]
31-
title = "rss"
32-
url = "index.xml"
23+
title = "info"
24+
25+
[[entries.entries]]
26+
title = "github"
27+
url = "https://github.com/daya0576/"
28+
[[entries.entries]]
29+
title = "rss"
30+
url = "atom.xml"
3331

3432
[[entries]]
35-
title = "another list"
33+
title = "friends"
3634

3735
[[entries.entries]]
3836
title = "with subitems"
3937

40-
[[entries.entries.entries]]
41-
title = "with subsubitems"
42-
43-
[[entries.entries.entries]]
44-
title = "example page"
45-
url = "about"
46-
4738
[[entries]]
4839
title = "PRO TIP"
4940
entries = [

layouts/footer.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
This is footer.
2-
You can edit this in ../nostyleplease/layouts/footer.md

layouts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ <h1>{{ $.Site.Title }}</h1>
99
{{ .Content }}
1010
{{ partial "menu_item.html" (dict "context" . "collection" $.Site.Data.menu.entries) }}
1111

12-
{{ end }}
12+
{{ end }}

layouts/partials/head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
{{ $style := $sass | css.Sass $options | resources.Fingerprint "sha512" }}
2020
<link rel="stylesheet" href="{{ $style.Permalink | relURL }}" integrity="{{ $style.Data.Integrity }}" />
2121
{{ if .Params.mathjax }} {{ partial "mathjax.html" . }} {{ end }}
22+
2223
</head>

layouts/posts/list.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ <h1>{{ .Title }}</h1>
77

88
<!-- divide post list by year -->
99
{{ if .Site.Params.theme_config.isListGroupByDate }}
10-
{{ range .Pages.GroupByDate "2006 Year" }}
11-
<p>{{ .Key }}</p>
12-
<ul>
13-
{{ range .Pages }}
14-
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
10+
{{ range .Pages.GroupByDate "2006" }}
11+
{{ $year := .Key }}
12+
{{ if ge $year 2000 }}
13+
<h2>{{ .Key }}</h2>
14+
<ul>
15+
{{ range .Pages }}
16+
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
17+
{{ end }}
18+
</ul>
1519
{{ end }}
16-
</ul>
1720
{{ end }}
1821
{{ else }}
1922
{{ partial "post_list.html" (dict "context" . "section" .Section)}}
2023
{{ end }}
2124

22-
{{ end }}
25+
{{ end }}

0 commit comments

Comments
 (0)