Notes of building https://airt.github.io/notes/
Prerequisites
Initialize
1 | npm install hexo-cli -g |
Configure
Modify url configuration in _config.yml
:
1 | # URL |
Install a Theme
1 | version='v5.1.2' |
Set theme in hexo root configuration _config.yml
:
1 | theme: next |
More Themes
Install Plugins
Setup GitHub Repository
Creat a New Repository
New repository https://github.com/yourname/notes
Configure GitHub Pages
At https://github.com/yourname/notes/settings
> GitHub Pages
, choose gh-pages branch
Setup Continuous Deployment
Enable Travis-CI for Repository
Configure Travis-CI Scripts
Add script commands in .travis.yml
:
1 | script: |
where npm scripts:
1 | { |
Setup Travis-CI Deployment for GitHub Pages
Add environment variables GITHUB_TOKEN
in Travis-CI settings
And add deployment configuration in .travis.yml
:
1 | deploy: |
Publish
1 | git add . |
Remarks
Hexo Commands
Start a local server:
1 | hexo server |
Examples
Source of this site: https://github.com/airt/notes