when rendering index.html, the variable page.content
has different value when exec hexo g
and hexo s
#2902
Labels
page.content
has different value when exec hexo g
and hexo s
#2902
Environment Info
hexo: 3.4.3
hexo-cli: 1.0.4
os: Darwin 16.7.0 darwin x64
http_parser: 2.7.0
node: 8.1.2
v8: 5.8.283.41
uv: 1.12.0
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
openssl: 1.0.2l
icu: 59.1
unicode: 9.0
cldr: 31.0.1
tz: 2017b
Your site
_config.yml
(Optional):Your theme
_config.yml
(Optional):Hexo and Plugin version(
npm ls --depth 0
):For BUG
To exec
hexo g
to generate public files, the value of variablepage.content
has a value and the value is my lastest article content when rendering index.html. But when i exechexo s
in cli and open webpagelocalhost:4000
in broswer, the value ofpage.content
isundefined
.i think this is a bug. It shouldn't give a value to
page.content
when rendering index.html.There are more details about this bug:
In the
layout.ejs
, i importsidebar.ejs
like that:In
_config.yml
, i am sure that i set the value of relative_link to false.when i develop in local, there is no problem. But when i deploy my project, i got a wrong variable
page
in the sidebar,page.content
has value in index page.The text was updated successfully, but these errors were encountered: