why themes folder is empty? 为何 themes 文件夹下没有文件? #5449
-
Check List
Expected behaviorThe files and folders appear to be in the wrong location. 文件和文件夹位置似乎不对。 Actual behaviorAfter installing Hexo, run the command: hexo init myhexo, directory as following: It is strange is that file _config.landscape.yml appears, and the folder themes is empty, but there is a folder hexo-theme-landscape in the folder node_modules, which should be the default theme of hexo. I try to install a new theme: npm i hexo-theme-stellar, the directory structure is still as shown above, the folder themes is still empty, and a new folder hexo-theme-stellar appears in the folder node_modules. I think hexo-theme-landscape and hexo-theme-stellar should be inside the folder themes, and the location of the _config.landscape.yml file is also wrong. Why?Does anyone else have similar issues? 安装好 Hexo 后,运行命令: hexo init myhexo, 查看目录如上图。 有点奇怪是出现了文件 _config.landscape.yml,而且文件夹 themes 是空的,而在 文件夹 node_modules 内有文件夹 hexo-theme-landscape,这应该是 hexo 缺省的主题。 如果试图安装新的主题, npm i hexo-theme-stellar,那么目录结构还是如上图,文件夹 themes 还是空的,而在文件夹 node_modules 内出现了新的文件夹 hexo-theme-stellar。 我认为 hexo-theme-landscape 和 hexo-theme-stellar 应该在文件夹 themes 里面才对,而且 _config.landscape.yml 文件的位置也不对。 为和会这样?其他人也有类似问题吗? How to reproduce?
Is the problem still there under
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hexo现已支持通过npm安装主题,主题不会出现在themes目录下。如果您需要主题出现在themes目录下,可以使用git clone等其他方式进行安装。 |
Beta Was this translation helpful? Give feedback.
-
These are two installation methods.
|
Beta Was this translation helpful? Give feedback.
-
_config.landscape.yml 的位置官网有明确说明 https://hexo.io/zh-cn/docs/configuration#使用代替主题配置文件
|
Beta Was this translation helpful? Give feedback.
Hexo现已支持通过npm安装主题,主题不会出现在themes目录下。如果您需要主题出现在themes目录下,可以使用git clone等其他方式进行安装。