Giter VIP home page Giter VIP logo

Comments (4)

lambdafate avatar lambdafate commented on July 17, 2024

试一下别的文件名, 不要使用archives.

你可以:

  1. archives文件重命名为archive
  2. hexo-folder/themes/vexo/_config.yml 中修改 Archives: /archives/
    Archives: /archive/

我这里本地测试是可以的, 你可以试试。

ps: 好像只要文件名不是archives就行

from hexo-theme-vexo.

fanezhao avatar fanezhao commented on July 17, 2024

我按照你的方法试了一下,确实可以了,有强迫症的我感觉到无比的酣畅淋漓,多谢啦!感激不尽!
但是不知道算什么会出现这样的问题?这是源码head.ejs中生成title的方式:

<title>
    <% if (page.title){ %>
      <%= page.title %> | <%= config.title %>
    <% } else { %>
      <%= config.title %>
    <% } %>
</title>

根据源码来看,找不到archivestitle,才会展示首页的title,可是明明有archives文件夹呀?

from hexo-theme-vexo.

lambdafate avatar lambdafate commented on July 17, 2024

老哥, 我又研究了下,应该是文件夹重复了。

问题出在 hexo-folder/_config.yml中, 该文件中的archive_dir选项默认为archives,你可以更改该选项为其他名字。

当执行 hexo generate 命令时, hexo会建立public文件(同样在_config.yml定义), 在public文件夹下又会导入 hexo-folder/source/ 下的文件夹(包括你自己建立的archives文件) , 同时建立archive_dir(默认为archives), 所以 _config.yml 中定义的archive_dir覆盖了你在source下建立的 archives

其实 tag_dir 默认为 tags, 也发生了重复, 但 hexo并没有删除它

你可以更改 _config.yml 中的 tag_dir, archive_dir, 执行 hexo generate, 然后查看 public 文件中的内容, 多试几次就明白了。

from hexo-theme-vexo.

fanezhao avatar fanezhao commented on July 17, 2024

兄弟,我看了一下,按照你的思路,修改_config.yml,确实出现你说的那种情况,_config.yml中的archives无论如何都会创建,即使我把archive_dir配置项删掉也是,这可能中Hexo的机制。
正如你所说,除了这个archivestagsproject都没问题,不知道什么原因?

from hexo-theme-vexo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.