sensui7
V2EX  ›  问与答

请问 Hexo 主题的变量怎么使用的

  •  
  •   sensui7 · Oct 21, 2016 · 2262 views
    This topic created in 3507 days ago, the information mentioned may be changed or developed.
    我已经彻底蒙圈了, 比如说 page.posts, 在文档上是在 Home (index)布局中, 但是我看很多主题里, archive, tag, category 布局都调用了同一个文件 partial/archive, 在这个文件中使用了 page.posts.

    但是我自己的主题就一直提示 undefined. 而文档中, 在 archive, category, tag 里都写了 Same as index layout but add the following variables. 既然与 index 相同, 怎么会 undefined 呢?
    天呐
    2 replies    2016-10-22 16:08:23 +08:00
    GermXu
        1
    GermXu  
       Oct 22, 2016
    看过 hexo 表示很好看,就是部署有点麻烦,我还是继续用 wp 吧
    sensui7
        2
    sensui7  
    OP
       Oct 22, 2016
    @GermXu 找到原因了, 是 bug, 擦, 换回别的主题照样报错,
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1012 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:25 · PVG 07:25 · LAX 16:25 · JFK 19:25
    ♥ Do have faith in what you're doing.