We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In index.html sections are default-ordered (https://gohugo.io/methods/site/regularpages/). Would be nice to have an option to change this order (e.g. by date ascending)
The text was updated successfully, but these errors were encountered:
Same problem. Any method to change the order?
Sorry, something went wrong.
Here's the way I do it (switchable vie site parameter):
diff --git a/layouts/index.html b/layouts/index.html index 4b826a1..84a5caf 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,6 +11,12 @@ {{ $section_name := . }} {{/* Create a variable with that section to use in multiple places. */}} {{ $section := where $.Site.RegularPages "Section" "in" $section_name }} + + {{ if $.Site.Params.order_by_date | default false }} + {{ $section = $section.ByDate }} + {{ end }} + + {{ $section_count := len $section }} {{ if ge $section_count 1 }} <div class="pa3 pa4-ns w-100 w-70-ns center">
Issue theNewDynamic#697: Add setting order_sections_by_date
order_sections_by_date
4daa604
Successfully merging a pull request may close this issue.
In index.html sections are default-ordered (https://gohugo.io/methods/site/regularpages/). Would be nice to have an option to change this order (e.g. by date ascending)
The text was updated successfully, but these errors were encountered: