Using hexo-theme-melody and Travis CI to build a beautiful hexo blog in a fast and with-version-control way.
Do all things on
- Fork this repo, rename it to
git cloneto your computer.
source/CNAMEor change its content to your own custom domain.
- Delete the
- Modify other configurations as needed, especially
_config.ymlin the root folder and the
source/_data/melody.yml(Follow the hexo-theme-melody-doc).
.gitlab-ci.ymlfor continuous integration build your blog. See this post for more information.
- Sync and activate your repo on https://travis-ci.com/.
Environment variables you need to config
For security, we should not publish our personal API keys on GitHub repo.
GL_TOKEN(only if you use GitLab)
Algolia search(only if you use Algolia)
You need four environment variables:
Configure them in Travis settings like below:
Write a post
$ hexo new post my-first-post ... writing...
deploy to the origin
$ ./deploy.sh "Added: my first post"
which is equivalent to
$ ./deploy.sh "Updated: blog source"