diff --git a/layouts/shortcodes/postlist.html b/layouts/shortcodes/postlist.html index ad372b1..6fe8111 100644 --- a/layouts/shortcodes/postlist.html +++ b/layouts/shortcodes/postlist.html @@ -5,19 +5,9 @@ {{- $pgr = (where $pgr "Params.categories" "intersect" (slice .)) -}} {{- end -}} {{- end -}} - -{{- if (ne (.Get "order") "") -}} - {{- $order := split (.Get "order") " " -}} - {{- if (eq (index $order 0) "alpha" ) -}} - {{- $pgr = $pgr.ByLinkTitle -}} - {{- else if (eq (index $order 0) "date" ) -}} - {{- $pgr = $pgr.ByDate -}} - {{- end -}} - {{- if (and (eq (len $order) 2) (eq (index $order 1) "desc")) -}} - {{- $pgr = $pgr.Reverse -}} - {{- end -}} +{{- if (eq (.Get "order") "alpha" ) -}} + {{- $pgr = $pgr.ByLinkTitle -}} {{- end -}} -