diff options
author | Oscar Najera <hi@oscarnajera.com> | 2024-12-27 22:36:46 +0100 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2024-12-27 22:36:46 +0100 |
commit | 2667cd02c159022ddaa38705538f60c79a547459 (patch) | |
tree | e3d74ff51bdf53b4b7fbe726e6f9c8fb61f8ed64 | |
parent | 6e33c33cff75f635684c0f09872fc861e59599a2 (diff) | |
download | hugo-minimalist-theme-2667cd02c159022ddaa38705538f60c79a547459.tar.gz hugo-minimalist-theme-2667cd02c159022ddaa38705538f60c79a547459.tar.bz2 hugo-minimalist-theme-2667cd02c159022ddaa38705538f60c79a547459.zip |
Display only publications on author page
-rw-r--r-- | layouts/_default/author.html | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/layouts/_default/author.html b/layouts/_default/author.html index 1179500..e47925a 100644 --- a/layouts/_default/author.html +++ b/layouts/_default/author.html @@ -12,15 +12,16 @@ </div> {{ end }} - - <div class="stripe-dark"> - <div class="mw7 center pv2 lh-copy f4-ns ph1"> - {{ range .Pages.GroupBy "Section" "asc" }} - <h2>{{ .Key }} {{ . }}</h2> - {{ range .Pages }} - {{ partial "post.html" . }} - {{ end }} - {{ end }} - </div> - </div> + {{ with where .Pages "Type" "publication" }} + {{ if gt (len .) 0 }} + <div class="stripe-dark"> + <div class="mw7 center pv2 lh-copy f4-ns ph1"> + <h2>Publications</h2> + {{ range . }} + {{ partial "post.html" . }} + {{ end }} + </div> + </div> + {{ end }} + {{ end }} {{ end }} |