fix: archive page style

This commit is contained in:
deepzz0
2021-05-07 16:28:26 +08:00
parent 1e4c0afc19
commit 79ac024312

3
pkg/cache/cache.go vendored
View File

@@ -541,7 +541,7 @@ func (c *Cache) regeneratePages() {
for i, article := range archive.Articles {
createdAt := article.CreatedAt.In(tools.TimeLocation)
if i == 0 && gt12Month {
str := fmt.Sprintf("* *[%s](/post/%s.html) <span class=\"date\">(%s)</span>\n",
str := fmt.Sprintf("* *[%s](/post/%s.html) <span class=\"date\">(%s)</span>*\n",
article.Title, article.Slug, createdAt.Format("Jan 02, 2006"))
buf.WriteString(str)
} else {
@@ -549,7 +549,6 @@ func (c *Cache) regeneratePages() {
article.Title, article.Slug, createdAt.Format("Jan 02, 2006"))
buf.WriteString(str)
}
buf.WriteByte('\n')
}
}
c.PageArchives = string(render.RenderPage(buf.Bytes()))