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

Broken future release notes date #52

Closed
sharifsalah opened this issue Mar 12, 2019 · 2 comments
Closed

Broken future release notes date #52

sharifsalah opened this issue Mar 12, 2019 · 2 comments

Comments

@sharifsalah
Copy link
Contributor

Setting the date for a release notes post in Docsy generates an error when running the hugo command. I think this is likely to be a common use-case for projects that are planning release notes or blog posts for a future date prior to launch.

I think this issue qualifies as a bug, so I wanted to log it to save others troubleshooting until a fix is identified and implemented.

Steps to reproduce

Follow the steps to clone and run the docsy-example:

git clone --recurse-submodules --depth 1 https://github.com/google/docsy-example.git
cd docsy-example
hugo server

Open the following file for editing:

content/en/blog/releases/in-depth-monoliths-detailed-spec.md

Change the date in the included release notes to be any date in the future:

date: 2020-03-20

If required, install any dependencies via npm.

Run the hugo command, which produces the following error for me:

Error: Error building site: failed to render pages: render of "section" failed: "<redacted>/docsy-example/themes/docsy/layouts/blog/list.html:7:11": execute of template failed: template: blog/list.html:7:11: executing "main" at <.Paginate>: error calling Paginate: cannot convert type hugolib.PagesGroup to Pages

This error disappears if there are also other release notes with dates in the past. The problem only seem to occur if I set the date to the future for the first release note. I haven't tested this issue for regular blog posts.

@hube12
Copy link
Contributor

hube12 commented Jun 27, 2020

I have reproduced this issue on a server that have a different timezone of mine

@emckean
Copy link
Collaborator

emckean commented Jun 2, 2023

I think this is now handled in Hugo: https://gohugo.io/getting-started/usage/#draft-future-and-expired-content

Please reopen if you're still seeing errors!

@emckean emckean closed this as completed Jun 2, 2023
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