diff options
author | Henning Blunck <mail@henningblunck.de> | 2021-01-02 16:28:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-02 16:28:06 +0300 |
commit | 7c87605d450d89dddee382369902bc189e87453e (patch) | |
tree | 5fab95e8941ca69875f28b641224bd851cfcdf8b /layouts/_default | |
parent | 505b8a9307fa93cb0e98830b02c8d98b5eb259c9 (diff) |
Make list.html fully generic (#203)
I love the list template. However, I had some issues using it for other content archetypes other than `posts`. This code change makes list.html fully generic, there are no more built in references to `posts`.
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Diffstat (limited to 'layouts/_default')
-rw-r--r-- | layouts/_default/list.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c8a5dfd..0001667 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -10,7 +10,7 @@ {{ define "sidebar" }} {{ $blogHome:="#" }} {{ if site.IsMultiLingual }} - {{ $blogHome = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) "posts") }} + {{ $blogHome = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }} {{ end }} <section class="sidebar-section" id="sidebar-section"> @@ -19,7 +19,7 @@ <input type="text" value="" placeholder="Search" data-search="" id="search-box" /> <div class="sidebar-tree"> <ul class="tree" id="tree"> - <li id="list-heading"><a href="{{ "/posts" | relLangURL }}" data-filter="all">{{ i18n "posts" }}</a></li> + <li id="list-heading"><a href="{{ .Type | relLangURL }}" data-filter="all">{{ i18n .Type }}</a></li> <div class="subtree"> {{ partial "navigators/sidebar.html" (dict "menus" site.Menus.sidebar "ctx" .) }} </div> |