diff options
author | morph <morph@posteo.de> | 2020-05-27 01:34:21 +0300 |
---|---|---|
committer | morph <morph@posteo.de> | 2020-05-27 01:34:21 +0300 |
commit | 5b51f4d9da25aa86b2e5ec3e62f3c09f0d8b8cf8 (patch) | |
tree | 3c3932335a474eb1c07201047bf61d25c7606d81 | |
parent | e284283965188dc91d0fbb7fcdfeb2daf6c0811c (diff) |
bring sidebar back for single pages
-rw-r--r-- | layouts/_default/single.html | 1 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ce7a5dd..7920d00 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -17,4 +17,5 @@ {{ end }} </article> </main> +{{ partial "sidebar.html" . }} {{ end }} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..92bbd80 --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,14 @@ +<aside> + <div> + <div> + <h3>LATEST POSTS</h3> + </div> + <div> + <ul> + {{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} + <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> + {{ end }} + </ul> + </div> + </div> +</aside> |