此blog搭建流程

linux上面安装node.js

参考:https://linux.cn/article-5766-1.html
  • 1 安装必要的包:
    apt-get install python gcc make g++ (centos 是:yum install python gcc+ gcc-c++)
  • 2 下载node.js包:
    wget https://nodejs.org/dist/v8.12.0/node-v8.12.0.tar.gz
    tar zxvf node-v8.12.0.tar.gz
  • 3 编译安装
    进入源代码的目录,然后运行.configure文件
    cd node-v8.12.0
    ./configure
    然后执行make install
  • 4 测试是否安装完成
    node -v

安装hexo

  • 创建目录
    mkdir hexo
  • 切换目录
    cd hexo
  • 安装Git(已安装可跳过)
    yum install git-core
  • 安装 Hexo
    npm install -g hexo-cli
  • 初始化 Hexo
    hexo init
    安装插件
    npm install hexo-generator-index –save
    npm install hexo-generator-archive –save
    npm install hexo-generator-category –save
    npm install hexo-generator-tag –save
    npm install hexo-server –save
    npm install hexo-deployer-git –save
    npm install hexo-deployer-heroku –save
    npm install hexo-deployer-rsync –save
    npm install hexo-deployer-openshift –save
    npm install hexo-renderer-marked –save
    npm install hexo-renderer-stylus –save
    npm install hexo-generator-feed –save
    npm install hexo-generator-sitemap –save
    npm install –save hexo-helper-live2d

修改hexo配置:

修改 hexo目录下_config.yml 文件:

# Site
title: Hexo
subtitle: 宁静致远
description:
keywords:
author: ph
language: zh-Hans
timezone: Asia/ShangHai

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: https://github.com/bigbai-ing/bigbai-ing.github.io.git
  branch: master
0%