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

Updated home page behavior with Hugo v >=0.58 #28

Closed
deniskyashif opened this issue Sep 23, 2019 · 4 comments
Closed

Updated home page behavior with Hugo v >=0.58 #28

deniskyashif opened this issue Sep 23, 2019 · 4 comments

Comments

@deniskyashif
Copy link

deniskyashif commented Sep 23, 2019

hugo server

Building sites … WARN 2019/09/23 13:33:41 In the next Hugo version (0.58.0) we will change how $home.Pages behaves. If you want to list all regular pages, replace .Pages or .Data.Pages with .Site.RegularPages in your home page template.

After updating hugo to v >= 0.58, the home page lists the top level pages, instead of the ones in /content/posts. Changing

-{{ range (.Paginate .Pages).Pages }}
+{{ range .Site.RegularPages }}

in /layouts/index.html preserves the existing behavior.

Update: To preserve the paginanion

{{ $paginator := .Paginate (.Site.RegularPages) }}
<div class="catalogue">
    {{ range $paginator.Pages }}
        {{ .Render "summary" }}
    {{ end }}
</div>
@hitdependency
Copy link

You are a saviour. I was looking for a solution for several hours

@EmielH
Copy link
Owner

EmielH commented Sep 30, 2019

Hi @deniskyashif, thanks for bringing this to my attention! I will update the theme as soon as possible.

EmielH added a commit that referenced this issue Sep 30, 2019
@EmielH
Copy link
Owner

EmielH commented Sep 30, 2019

Could you check if the current version of the theme solves this problem? Thanks a lot!

@deniskyashif
Copy link
Author

Could you check if the current version of the theme solves this problem? Thanks a lot!

Yes, it works. Thanks for the fix!

@EmielH EmielH closed this as completed Sep 30, 2019
cloudlena pushed a commit to cloudlena/tale-hugo that referenced this issue Feb 10, 2024
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

No branches or pull requests

3 participants