banner
NEWS LETTER

Hexo网站搭建和命令

Scroll down

Hexo搭建和命令参考

Hexo搭建步骤:

安装Git
安装Node.js
安装Hexo
GitHub创建个人仓库
生成SSH添加到GitHub
将hexo部署到GitHub
设置个人域名
发布文章

  1. 安装Git和Node.js,D盘创建WWW,WWW目录下cmd

    1
    2
    3
    4
    npm install hexo-cli -g 
    hexo init Blog
    cd Blog
    npm install
  2. 创建GitHub仓库: https://cyphersun.github.io/

  3. 链接GitHub,然后再次确认没有输错

    1
    2
    3
    4
    5
    git config --global user.name "CypherSun"
    git config --global user.email "84860748@qq.com"

    git config user.name
    git config user.email
  4. 创建ssh文件,一直回车就行

    1
    ssh-keygen -t rsa -C "84860748@qq.com"
  5. 在GitHub的setting中,找到SSH keys,点击New SSH key,输入前面在本地电脑生成的id_rsa.pub

  6. 输入yes,确定链接GitHub

    1
    ssh -T git@github.com
  7. Blog目录下cmd

    1
    2
    3
    4
    5
    6
    7
    8
    npm install hexo-deployer-git --save
    npm install --save hexo-renderer-less hexo-renderer-ejs
    git clone https://github.com/miiiku/hexo-theme-flexblock.git ./themes/flexblock
    npm i hexo-theme-async@latest
    npm install hexo-helper-live2d
    npm install live2d-widget-model-hijiki
    npm install live2d-widget-model-wanko
    npm install hexo-generator-searchdb
  8. 复制备份的source,scaffolds,_config.yml,_config.flexblock.yml,_config.async.yml到Blog目录下

  9. 访问本地:
    hexo g
    hexo s
    访问本地 4000端口

  10. 上传github:
    hexo clean
    hexo g
    hexo d
    访问Github 网址

其他文章
请输入关键词进行搜索