Code Monkey home page Code Monkey logo

Comments (15)

wujun234 avatar wujun234 commented on July 26, 2024 1

_config.tree.yml

不懂了,我是 hexo-cli: 4.3.1, _config.tree.yml 这种我补充在 readme 里吧

from hexo-theme-tree.

wujun234 avatar wujun234 commented on July 26, 2024

好主意,为了兼容性,还可以先读取hexo配置,再读取theme配置

from hexo-theme-tree.

awaae001 avatar awaae001 commented on July 26, 2024

也不是不可以

from hexo-theme-tree.

seekstar avatar seekstar commented on July 26, 2024

好像有问题,我把theme/tree里的config复制到外面的_config.yml之后hexo s -g,发现全都变成默认的了,外面的_config.yml里的设置没有起作用

from hexo-theme-tree.

wujun234 avatar wujun234 commented on July 26, 2024

好像有问题,我把theme/tree里的config复制到外面的_config.yml之后hexo s -g,发现全都变成默认的了,外面的_config.yml里的设置没有起作用

主题里的配置会覆盖 hexo 的配置,更新之后,主题里就没有默认值了。

如果你把之前的复制出去,记得把主题里的配置删一下哈

from hexo-theme-tree.

seekstar avatar seekstar commented on July 26, 2024

说错了,是move到外面。主题里的已经删了

from hexo-theme-tree.

wujun234 avatar wujun234 commented on July 26, 2024

说错了,是move到外面。主题里的已经删了

不应该啊,你有 clean 试试吗?因为我没有改代码(因为 hexo 的 theme 是继承自网站配置的),只是删掉了主题里的默认配置项,贴到了 readme 里。

https://hexo.io/zh-cn/docs/variables.html

from hexo-theme-tree.

awaae001 avatar awaae001 commented on July 26, 2024

啊?

from hexo-theme-tree.

seekstar avatar seekstar commented on July 26, 2024

hexo clean然后hexo s -g了,还是那样

from hexo-theme-tree.

wujun234 avatar wujun234 commented on July 26, 2024

具体是什么默认值啊,如果更新之后,应该没有默认值了,而且我的页面用了新的版本发布过,看起来是正确运行的

from hexo-theme-tree.

seekstar avatar seekstar commented on July 26, 2024

就是没有评论,没有github链接,没有about/tags/categories,就连favicon都变成你的了/笑哭

from hexo-theme-tree.

seekstar avatar seekstar commented on July 26, 2024

能把你的网站的hexo repo给我看看吗?说不定是我哪里写错了

from hexo-theme-tree.

seekstar avatar seekstar commented on July 26, 2024

把配置放进_config.tree.yml就正常了。
参考了next主题的配置:https://theme-next.js.org/docs/getting-started/configuration

from hexo-theme-tree.

wujun234 avatar wujun234 commented on July 26, 2024

能把你的网站的hexo repo给我看看吗?说不定是我哪里写错了

我的就是把之前的粘贴在 hexo 的配置里了,想不通,难道会有版本原因吗...

_config.tree.yml 这种形式我也没见过,应该是 hexo 支持的某种配置读取方式吧

favicon 你看代码是 theme.favicon 有值才会设置的,但是我们又没有默认值,还是怀疑是哪一步 cache 了

from hexo-theme-tree.

seekstar avatar seekstar commented on July 26, 2024

我的就是把之前的粘贴在 hexo 的配置里了,想不通,难道会有版本原因吗...

不知道。我用的hexo 6.3.0。可能这个hexo版本不能直接从repo根目录的_config.yml里继承吧。其实我觉得从_config.主题.yml里读取比从repo根目录的_config.yml里继承好,至少各个配置的key的名字不容易发生冲突。

favicon 你看代码是 theme.favicon 有值才会设置的,但是我们又没有默认值,还是怀疑是哪一步 cache 了

这个有可能是cache。但是像没有评论、没有github链接这种不太可能是cache导致的,而且我把配置放到_config.tree.yml里这些问题就消失了,说明就是因为在我的开发环境里不支持直接从_config.yml里继承。

from hexo-theme-tree.

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.