1.hexo图片插入无法显示问题
- 将hexo的主页配置文件中的_config.yml里的post_asset_folder设置为true。
- 在git bash里运行
npm install https://github.com/CodeFalling/hexo-asset-image --save
,安装上传图片的插件 - 安装完成后,再运行hexo new xxx来生成md文件时,/source/_posts文件夹内除了xxx.md文件还有一个同名的文件夹,这个文件夹用来存放博文中用到的图片
- 引用图片时通过正常语法

- 最后hexo g生成和 hexo d上传至github
2.spawn failed和fatal: unable to access问题
- 原因分析:
其实出现这个问题,很大可能是因为https和http的proxy的对应的分别是https和http开proxy server,而https的proxy server可能无法正常工作。一个work around是把https的proxy server换成http的proxy server:
解决办法有三种
修改_config.yml文件的deploy部分,将https 修改为http url 或者 设置为git url, 配置为https oauth2 加token
- 设置为git url(推荐)
deploy:
type: git
repo: git@github.com:your_github_id/your_github_id.github.io.git
branch: gh-pages
- 将https 修改为http url
deploy:
type: git
repo: http://github.com/your_github_id/your_github_id.github.io.git
branch: gh-pages
- 在repo https url上要添加授权方式和token
deploy:
type: git
repo: https://oauth2:your_github_token@github.com/your_github_id/your_github_id.github.io.git
branch: gh-pages