-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Cannot access the content of the "site" global variable in a template #3038
Comments
When desperately analyzing the data provided by
|
I think this is a bug, or, if intended, documentation must be updated - the following works (please note the extra
|
This is actually a documentation issue. |
Calling |
Environment Info
Node version(
node -v
): 8.9.4Hexo and Plugin version(
npm ls --depth 0
):For BUG
I want to use global variable in a Pug template, specifically list the titles of all my posts (there are two of them):
This code outputs the following HTML file
There are two empty
<li></li>
, which suggests that the iteration over the posts was successful.The console output with debug enabled. Please note the
console.log()
output of mine, which shows that two indexes of the array were iterated overI had the same problem with ESJ as the template engine.
The text was updated successfully, but these errors were encountered: