虽然现在市面上有很多博客平台,例如CSDN、简书、博客园等,但是这类博客平台比较不自由,会有很多限制和广告。而对于自己购买域名及服务器,搭建这样的博客成本实在是太高,还要定期维护。因此我选择利用hexo框架在github page上托管我的博客。这样就可以快速上手,安心创作,节省不少的时间和精力。
一、部署环境
1、安装Node.js
首先在Node.js官网下载LTS(长期支持)版。我下载的文件是node-v10.16.3-linux-x64.tar.xz,将其解压。
Linux;C/C++;程序员
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
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