博客文件

node_modules: 依赖包

public:存放生成的页面

scaffolds:模版文件。当创建一篇新的文章时,hexo会依据模版文件进行创建

source:用来存放你的文章,图片等资源

themes:主题文件夹

_config.yml 站点配置文件。很多全局配置都在这个文件中

package.json 应用数据,版本信息等

基础命令

hexo c #清理一下

hexo g #生成

hexo s #部署到本地4000端口

hexo d #部署到远程Github仓库

hexo new paper #创建在_post文件夹下,与hello world同目录

hexo new page category #增加页面导航,并在项目目录/source/category/index.md加上 type: category

附录

  1. 若出现以下报错,则去修改全局配置文件_config.yml
  2. 将deploy下的repo的值修改为ssh的链接
    1
    2
    3
    4
    5
    6
    7
    fatal: unable to access  'https://github.com/Candlelight-XYJ/Candlelight-XYJ.github.io.git/': OpenSSL  SSL_read: Connection was reset, errno 10054
    FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
    Error: Spawn failed
    at ChildProcess.<anonymous> (D:\StudyMaterials\8_FileManagement\testBlog\blog\node_modules\hexo-util\lib\spawn.js:51:21)
    at ChildProcess.emit (events.js:314:20)
    at ChildProcess.cp.emit (D:\StudyMaterials\8_FileManagement\testBlog\blog\node_modules\cross-spawn\lib\enoent.js:34:29)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)