【问题标题】:How to get rid of "categories" in url in hexo如何摆脱 hexo 中 url 中的“类别”
【发布时间】:2017-03-31 23:12:50
【问题描述】:

Hexo 中,我想去掉网址中的categories。现在看起来像:

localhost:4000/categories/artists localhost:4000/categories/projects

我想去掉categories,这样网址就变成了:

localhost:4000/artists localhost:4000/projects

这可能吗?

【问题讨论】:

    标签: javascript url generator static-site hexo


    【解决方案1】:

    当然,只需在您的博客 (_config.yml) 的配置文件中将 category_dir 变量设置为空字符串 ("")

    【讨论】:

    • 这行得通,但是浏览器选项卡中的 page_title 呢,仍然显示“类别”...?
    猜你喜欢
    • 2022-01-25
    • 1970-01-01
    • 1970-01-01
    • 2014-07-20
    • 1970-01-01
    • 2012-03-02
    • 1970-01-01
    • 1970-01-01
    • 2013-04-27
    相关资源
    最近更新 更多