Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanzei <hanzei@mailbox.org>2018-07-03 14:21:06 +0300
committerHanzei <hanzei@mailbox.org>2018-07-03 14:21:06 +0300
commit3418b9f80ccf4e190bc14281da3f02a259b4734b (patch)
tree0446b9bcb04dc3a5476b2b53912c2e6afcddee49
parentceb94b3e911052813d64a8bc69b6a4be9a2cbb16 (diff)
Fix missing partial
-rw-r--r--layouts/blog/list.html8
-rw-r--r--layouts/partials/blog/li.html5
-rw-r--r--layouts/partials/home/blog.html6
3 files changed, 7 insertions, 12 deletions
diff --git a/layouts/blog/list.html b/layouts/blog/list.html
index fe351b6..eede8cc 100644
--- a/layouts/blog/list.html
+++ b/layouts/blog/list.html
@@ -23,12 +23,6 @@
{{ end }}
<h2 class="title is-2 top-pad">{{ i18n "index_blog_allPosts" . }}</h2>
- <ul>
- {{ range .Pages.ByPublishDate.Reverse }}
- <li class="post-item">
- <span><a href="{{ .Permalink }}">{{ .Title }}</a></span> - <span>{{ .Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }}</span>
- </li>
- {{ end }}
- </ul>
+ {{ partialCached "blog/li.html" . }}
</div>
{{ end }}
diff --git a/layouts/partials/blog/li.html b/layouts/partials/blog/li.html
new file mode 100644
index 0000000..9a79283
--- /dev/null
+++ b/layouts/partials/blog/li.html
@@ -0,0 +1,5 @@
+{{ range .Pages.ByPublishDate.Reverse }}
+ <li class="post-item">
+ <span><a href="{{ .Permalink }}">{{ .Title }}</a></span> - <span>{{ .Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }}</span>
+ </li>
+{{ end }}
diff --git a/layouts/partials/home/blog.html b/layouts/partials/home/blog.html
index bb323c9..b26801c 100644
--- a/layouts/partials/home/blog.html
+++ b/layouts/partials/home/blog.html
@@ -18,11 +18,7 @@
{{ end }}
{{ if .Site.Params.showAllPosts }}
<h2 class="title is-2 has-text-centered top-pad">{{ i18n "index_blog_allPosts" . }}</h2>
- <ul>
- {{ range .Pages }}
- {{ partial "li.html" . }}
- {{ end }}
- </ul>
+ {{ partialCached "blog/li.html" . }}
{{ else }}
<div class="container has-text-centered top-pad">
<a href="{{ .RelPermalink }}">{{ i18n "index_blog_allPosts" . }}</a>