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

Adjusted post list for Hugo v0.57.0 #81

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

jvalecillos
Copy link

@jvalecillos jvalecillos commented Aug 16, 2019

What

Adjusting the index page to show all the posts in descending order in the version v0.57.0 of Hugo.

Why

After the changes in gohugoio/hugo#6181 included in the version v0.57.0 of Hugo the index page shows the post category instead of all the posts.

This use of .Site.RegularPages keeps retro-compatibility with previous versions of Hugo.

@jvalecillos jvalecillos force-pushed the patch/post-list-hugo-v0.57.0 branch from 202188e to 1c50bcc Compare August 16, 2019 18:35
@VincentTam
Copy link

You have hard-coded value "post", which is to be avoided. You may see Hugo's docs for mainSections to know more.

{{ $paginator := .Paginate (where .Site.RegularPages "Type" "posts") }}

@jvalecillos
Copy link
Author

Thank you @VincentTam I added your suggestion.

@htr3n
Copy link
Owner

htr3n commented Aug 19, 2019

@jvalecillos many thanks for the PR.

@htr3n htr3n merged commit 19b2178 into htr3n:master Aug 19, 2019
@htr3n
Copy link
Owner

htr3n commented Aug 19, 2019

@jvalecillos have you tried the PR with your settings? I tried but it didn't work, still empty home page. I will figure out where the issue is.

@htr3n
Copy link
Owner

htr3n commented Aug 19, 2019

@jvalecillos Sorry, it was my mistake messing up something in my local settings. Your PR is fine and working. Thanks

@jvalecillos jvalecillos deleted the patch/post-list-hugo-v0.57.0 branch August 19, 2019 10:12
nankeen pushed a commit to nankeen/hyde-hyde that referenced this pull request Apr 22, 2020
…57.0

This should fix the issue with Hugo's breaking changes since v0.57 as mentioned in gohugoio/hugoThemes#678.
- adjusted post list for Hugo v0.57.0
Credits: @jvalecillos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants