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
"post.date" passed in as current date when its not set / null #4621
Comments
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue. |
https://hexo.io/docs/helpers#is-page You can use |
I have a working work-around so this issue is not blocking me. But |
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
When I use "page", I do not want to have a date (I only use date for "post"). If I un-set the date (dont have it set in md), its still passed in as current date to my theme.
Expected behavior
post.date
is falsey.Actual behavior
post.date
is current date.How to reproduce?
Use this page (no date set):
Environment & Settings
Node.js & npm version(
node -v && npm -v
)Hexo and Plugin version(
npm ls --depth 0
)Your package.json
package.json
Others
I added this to my page in the theme file
<h1><%= post.date %></h1>
and I seeSat Jan 23 2021 22:24:47 GMT-0800
when no date is set.The text was updated successfully, but these errors were encountered: