Hexo + Yilia快速搭建个人博客网站

以下命令涉及配置github、安装hexo、安装yilia主题、deploy配置

安装

# 配置 github
git config --global user.name 'longxiaojiangi'
git config --global user.email 'longxiaojiangi@163.com'
ssh-keygen -t rsa -C 'longxiaojiangi@163.com' # 三次回车
# 到github添加完ssh
ssh git@github.com
# 安装 hexo,在Blog文件夹父目录打开Git bash
npm install -g hexo-cli
hexo init blog
cd blog
npm install
npm install hexo-deployer-git --save
# 安装 yilia
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
cd themes/yilia
git pull
# 在blog目录打开git bash
npm i hexo-generator-json-content --save

配置

deploy:
    type: git
    repo: git@github.com:longxiaojiangi/longxiaojiangi.github.io.git
    branch: master
jsonContent:
    meta: false
    pages: false
    posts:
      title: true
      date: true
      path: true
      text: false
      raw: false
      content: false
      slug: false
      updated: false
      comments: false
      link: false
      permalink: false
      excerpt: false
      categories: false
      tags: true
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容