V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
vfiles
V2EX  ›  问与答

求助, HEXO 的标签页无内容

  •  
  •   vfiles · 2018-03-04 10:01:08 +08:00 · 3640 次点击
    这是一个创建于 2238 天前的主题,其中的信息可能已经有所发展或是发生改变。

    依照 hexo 官网步骤和对应主题的文档,

    • 新建 tags 页面:hexo new page "tags"
    • 编辑 tags/index.md
      title: Tags
      date: 2018-03-04 00:17:30
      tape: "tags"
      
    • hexo clean & hexo g
    • hexo server
    • 浏览 localhost:4000/tags,虽然已经在侧边栏看到有标签数为 5,仍然是一片空白,如图: r5pZH.md.jpg

    新建的 tags/index.md 里面只写以上内容,能自己生成页面吗?为什么只显示到页面 title? 是否需要自己手动写入生成规则?

    请问一下到底要怎么解决?

    mrcotter2013
        1
    mrcotter2013  
       2018-03-04 10:51:44 +08:00   ❤️ 1
    根据不同的 theme,在 layout 中需要定义 tags 页面显示的内容,例如 next 主题就写入到 page.swig,其它主题的结构可能不同,也有可能使用 .ejs 格式
    input2output
        2
    input2output  
       2018-03-04 11:02:10 +08:00   ❤️ 1

    ```

    type: "tags"

    ```

    ……
    input2output
        3
    input2output  
       2018-03-04 11:03:04 +08:00
    看到 tape 的时候就感觉怪怪的,一看,确实是错的
    a1023614047
        4
    a1023614047  
       2018-03-04 13:08:14 +08:00 via iPhone   ❤️ 1
    方法错误吧?我用的主题需要在 source 里新建 tags 文件夹,再新建 index.md ,定义 layout,之后才可以
    a1023614047
        5
    a1023614047  
       2018-03-04 13:09:04 +08:00 via iPhone
    而且显示 tags,需要在你自己的博客里写 tags: xxx
    a1023614047
        6
    a1023614047  
       2018-03-04 13:09:20 +08:00 via iPhone
    这是我作为新手的理解
    vfiles
        7
    vfiles  
    OP
       2018-03-04 16:40:01 +08:00 via Android
    @input2output
    Σ(ŎдŎ|||)ノノ确实写错了,
    但是昨晚用的 yelee 主题,有几个问题没解决,
    今天换了 next,什么问题都没有了,哈哈哈
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2794 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:03 · PVG 21:03 · LAX 06:03 · JFK 09:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.