about summary refs log tree commit diff
path: root/layouts/index.html
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2021-04-28 13:08:24 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2021-04-28 13:08:24 +0700
commitfd7c479383add732f2e855d6eaf3712f6742cac1 (patch)
tree2f2b45a9aa53b62ad7b4c27fe8166d6f88fd570b /layouts/index.html
parenta35d3477f5f20efbbe1e9859bebefb32169d9021 (diff)
downloadblog-fd7c479383add732f2e855d6eaf3712f6742cac1.tar.gz
Edit layout for multiple sections
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..414d5e6
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,19 @@
+{{ define "main" }}
+    <div class="homepage-content">
+        {{ .Content }}
+        <ul>
+            {{ range .Site.Sections }}
+            <li> <a href="{{ .Permalink }}">{{ .Title }}</a> </li>
+            {{ end }}
+        </ul>
+    </div>
+
+    <div class="articles h-feed">
+        {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+        {{ range (.Paginate $pages).Pages }}
+            {{ partial "postSummary.html" . }}
+        {{ end }}
+        {{ partial "pagination.html" . }}
+    </div>
+
+{{ end }}