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

Replace page now with now function #76

Merged
merged 2 commits into from
Feb 5, 2018

Conversation

npwalker
Copy link
Contributor

@npwalker npwalker commented May 1, 2017

This PR include #59 because that seems like a good idea and changes the same code.

This gets rid of the following deprecation message during build.

WARNING: Page's Now is deprecated and will be removed in a future release. Use now (the template func).

@npwalker npwalker force-pushed the replace_page_now_with_now_function branch from 4ee7800 to 2ad9ebb Compare May 1, 2017 15:19
@npwalker npwalker force-pushed the replace_page_now_with_now_function branch from 2ad9ebb to e0a87bf Compare May 1, 2017 15:21
@douglas-watson
Copy link

Another vote here to merge this pull request! Hyde-X no longer works with Hugo 0.35, and this pull request fixes it. Thanks @npwalker.

Here was my error message, in case anyone googles it in the future:

ERROR 2018/02/02 11:07:25 Error while rendering "taxonomyTerm" in "": template: theme/_default/list.html:1:3: executing "theme/_default/list.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:47:3: executing "theme/partials/head.html" at <partial "sidebar.htm...>: error calling partial: template: theme/partials/sidebar.html:48:31: executing "theme/partials/sidebar.html" at <.Now.Format>: can't evaluate field Now in type *hugolib.PageOutput
ERROR 2018/02/02 11:07:25 Error while rendering "home" in "": template: theme/index.html:1:3: executing "theme/index.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:47:3: executing "theme/partials/head.html" at <partial "sidebar.htm...>: error calling partial: template: theme/partials/sidebar.html:48:31: executing "theme/partials/sidebar.html" at <.Now.Format>: can't evaluate field Now in type *hugolib.PageOutput
ERROR 2018/02/02 11:07:25 Error while rendering "404" in "": template: theme/404.html:1:3: executing "theme/404.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:47:3: executing "theme/partials/head.html" at <partial "sidebar.htm...>: error calling partial: template: theme/partials/sidebar.html:48:31: executing "theme/partials/sidebar.html" at <.Now.Format>: can't evaluate field Now in type *hugolib.PageOutput

Until the pull request is accepted, anyone who has the same problem can switch to npwalkers branch:

cd themes/hyde-x
git remote add npwalker git@github.com:npwalker/hyde-x.git
git fetch npwalker
git checkout replace_page_now_with_now_function

@zyro zyro merged commit 19bb3b2 into zyro:master Feb 5, 2018
@zyro
Copy link
Owner

zyro commented Feb 5, 2018

Thanks, I don't have a lot of time to maintain this theme so this is much appreciated! 👍

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.

None yet

4 participants