why themes folder is empty? 为何 themes 文件夹下没有文件?
johnbao6 opened this issue · comments
Check List
- I have already read Docs page & Troubleshooting page.
- I have already searched existing issues and they are not help to me.
- I examined error or warning messages and it's difficult to solve.
- I am using the latest version of Hexo. (run
hexo version
to check) - My Node.js is matched the required version.
Expected behavior
The files and folders appear to be in the wrong location.
文件和文件夹位置似乎不对。
Actual behavior
After 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?
- hexo init myhexo
- ll
- npm i hexo-theme-stellar
- ll
Is the problem still there under Safe mode
?
yes
Your Node.js & npm version
v21.7.1
10.5.0
Your Hexo and Plugin version
hexo-site@0.0.0 /home/bao/myhexo
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-marked@6.2.0
├── hexo-renderer-stylus@3.0.1
├── hexo-server@3.0.0
├── hexo-theme-landscape@1.0.0
├── hexo-theme-stellar@1.27.0
└── hexo@7.1.1
Your package.json
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
"hexo": {
"version": ""
},
"dependencies": {
"hexo": "^7.0.0",
"hexo-generator-archive": "^2.0.0",
"hexo-generator-category": "^2.0.0",
"hexo-generator-index": "^3.0.0",
"hexo-generator-tag": "^2.0.0",
"hexo-renderer-ejs": "^2.0.0",
"hexo-renderer-marked": "^6.0.0",
"hexo-renderer-stylus": "^3.0.0",
"hexo-server": "^3.0.0",
"hexo-theme-landscape": "^1.0.0",
"hexo-theme-stellar": "^1.27.0"
}
}
Your site's _config.yml
(Optional)
No response
Others
No response
Hexo现已支持通过npm安装主题,主题不会出现在themes目录下。如果您需要主题出现在themes目录下,可以使用git clone等其他方式进行安装。