Hexo: Using Jade with partials and layouts (page.content)

Created on 30 Apr 2016  ·  1Comment  ·  Source: hexojs/hexo

I can't figure out how to use page.content with a 100% Jade site (layouts, partials and pages written in Jade).

I've tried something like this in my index.jade layout, but the page's content never appears in index.html (which uses the index layout, also tried with a page layout):

block content
  .container!= page.content

The head, header and footer partials do appear in the rendered page, which displays correctly.

Hexo version information:

hexo: 3.2.0
hexo-cli: 1.0.1
os: Windows_NT 10.0.10240 win32 x64
http_parser: 2.7.0
node: 6.0.0
v8: 5.0.71.35
uv: 1.9.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 48
openssl: 1.0.2g

Update: it appears this affects only the index.jade page. Renaming it to index2.jade works fine.

Most helpful comment

Solved by uninstalling hexo-generator-index, like this:

npm uninstall --save hexo-generator-index**

>All comments

Solved by uninstalling hexo-generator-index, like this:

npm uninstall --save hexo-generator-index**
Was this page helpful?
0 / 5 - 0 ratings