个人博客的学习

个人博客

所需要的环境

  1. 安装node和注册一个github 以及安装淘宝镜像命令是npm install -g cnpm --regustry.npmtaobao.org
  2. 新建一个文件夹在该文件夹输入安装hexo命令是 cnpm install -g hexo-cli
  3. 开启博客命令hexo s
  4. 将自己的博客部署到github上新建的博客名字必须是自己github的用户名.github.io
  5. 安装一个插件cnpm install --save hexo-deployer-git
  6. 找到.yml这个文件然后修改里面的值
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: 'git'
  repo: '[email protected]:xiao-dai-gua/xiao-dai-gua.github.io.git'
  branch: 'master'
  1. 然后将代码上传到远端是hexo d
  2. 然后在浏览器中输入就可以 https://xiao-dai-gua.github.io/浏览了
  3. 下载主题 git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
    可以将https改成http这样克隆更快
  4. 然后打开.yml文件配置主题:更改文件夹名为yilia
  5. hexo g 生成静态网站的命令

猜你喜欢

转载自blog.csdn.net/qq_47988584/article/details/120327066