Skip to content
New issue

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

Ordering content in a list layout #313

Closed
gtitov opened this issue Oct 10, 2022 · 2 comments · Fixed by #317
Closed

Ordering content in a list layout #313

gtitov opened this issue Oct 10, 2022 · 2 comments · Fixed by #317
Labels
bug Something isn't working

Comments

@gtitov
Copy link
Contributor

gtitov commented Oct 10, 2022

What happened?

Hey! The theme is awesome. I faced some minor issues ordering content in a list layout. I'm not sure if they can be considered bugs but I wanted to share.

Order by date before weight

While default Hugo behavior is to order content by weight > date > title > filename Congo seems to order content by date > weight > ... So if date exists in a frontmatter weight is ignored.

Order by weight goes bottom-to-top

When there is no dates in posts Hugo orders content by weight. But content with lower weight comes lower in the list while Hugo docs says "Lower weight gets higher precedence.". So I expected a page with the lowest weight to appear first but it appears last in a list with the Congo theme.

Theme version

v2.3.0

Hugo version

v0.101.0

What browsers are you seeing the problem on?

Chrome

Relevant Hugo log output

No response

@gtitov gtitov added the bug Something isn't working label Oct 10, 2022
@jpanther
Copy link
Owner

Thanks for the detailed report. I'll take a look at these and see if there's any adjustments to be made that can improve the output. In general, I try to stick to the default Hugo behaviours as much as possible.

@gtitov
Copy link
Contributor Author

gtitov commented Oct 13, 2022

A bit of a research showed that this line is responsible for the issue if it helps somehow

{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}

@jpanther jpanther added the wip Work in progress label Nov 7, 2022
jpanther added a commit that referenced this issue Nov 7, 2022
🩹 Fix #313 ordering content in a list layout
@jpanther jpanther removed the wip Work in progress label Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants