-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
docs: page/post variable #1272
base: master
Are you sure you want to change the base?
docs: page/post variable #1272
Conversation
`page.tags` | All tags of the post | `array` of ??? | ||
`post.published` | True if the post is not a draft | `boolean` | ||
`post.categories` | All categories of the post | `array` of ??? | ||
`post.tags` | All tags of the post | `array` of ??? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those variables mentioned here is used in template when the layout
is post
and should access via page.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leme know so I make the change in other languages too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the theme developers, they may need to reuse the same article template for both home page and post page. So, a post variable will be used, in home page post = page.posts.toArray()[0]
, in post page post = page
.
@SukkaW Can you confirm https://github.com/hexojs/site/pull/1273/files is the right fix? So I can close this PR and make the change in #1273 for all languages. |
Check List
Please read and check followings before submitting a PR.