Closed johnbao6 closed 6 months ago
当你使用稳定版安装时主题目录位于node_modules
文件夹下
很奇怪的做法,themes文件夹还有什么意思?还不如删除了
如果你是使用最新版或者自定义的话主题文件是在themes下的,这是给想要尝鲜或者需要改动主题源码的人准备的
通过npm安装的主题并不是给用户修改用的,许多操作(update或者在新的环境中build)都有可能让你的主题恢复至官方版本。
如需修改主题,请使用git clone方式。
谢谢大家给的建议。 我还是认为这种做法是非常怪异的,而且似乎也没有教程解释它,或许是因为怪异本身就很不自然,故而在教程中也很难解释清楚。 Hexo 本来是为了让新手很容易上手,但是这个怪异的做法只会让新手迷惑不解。 与其这样,还真的不如删了 themes 文件夹和 _config.landscape.yml 文件。
既然提到了 landscape , hexo 的默认主题 hexo-theme-landscape 也是作为 npm 包存在于 node_modules/ 目录下,而不是位于 theme/ 目录下,并且在 README 中向用户提供了 npm 安装方式。你也可以向他们提出这个 issue,来获得解答。
@johnbao6
node_modules
的部分是由 node 决定的themes/
的部分是由 hexo 决定的
对上述哪种做法感到怪异可以去对应的项目中提 issue ,本项目本质上只是 hexo 的一个“插件”,改变不了 hexo 的规则,更改变不了 node 的规则。谢谢两位的解释。
老实说,我一开始使用 Hexo 时,就被其中的目录结构给弄糊涂了。 我看到的所有教程(中文或英文的)都是把主题中的文件放在 themes 下面的,而我的却不是的,一开始以为只是我自己的问题,虽然基本上不影响使用。
:wave: Hello, This issue has been marked as resolved. If there are other issues, please contact us with a new issue.
:wave: 您好, 此 issue 已经被标记为已解决,如果还有其它问题,请提出新的 issue 联系我们。
检查清单
问题描述
装好 Hexo 后,运行 以下命令 npm i hexo-theme-stellar, 然后在 _config.yml 文件中修改 theme: stellar, 也出现了 stellar 风格的主题,似乎一切都很正常,但是当我想看看 themes 文件夹下有哪些文件时,竟然发现是空的。
stellar 主题中的文件放在哪个目录下?