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

docs: page/post variable #1272

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

docs: page/post variable #1272

wants to merge 7 commits into from

Conversation

noraj
Copy link
Contributor

@noraj noraj commented Jan 5, 2020

Check List

Please read and check followings before submitting a PR.

  • Others (Update, fix, translation, etc...)

image

image

`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 ???
Copy link
Member

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..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SukkaW ok so this is the right fix #1273

Copy link
Contributor Author

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

Copy link
Member

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.

@noraj noraj mentioned this pull request Jan 5, 2020
15 tasks
@noraj
Copy link
Contributor Author

noraj commented Jan 14, 2020

@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.

@noraj noraj requested a review from SukkaW February 19, 2020 00:31
@uiolee uiolee changed the title page/post variable docs: page/post variable Sep 2, 2023
@uiolee uiolee added Docs source/docs zh lang: zh-cn && zh-tw en lang: en ko lang: ko pt-br lang: pt-br ru lang: ru th labg: th labels Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs source/docs en lang: en ko lang: ko pt-br lang: pt-br ru lang: ru th labg: th zh lang: zh-cn && zh-tw
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants