Sometimes you may want to build a blog to record your learning. As a beginner, you may consider using the Hexo framework with Github Pages to quickly set up you blog website.
Hexo
Hexo is a framework which convert markdown file into html page. Markdown has relatively simplier syntax, which means you do not need to waste time on wrapping your article with tags.
Setup
You can create a blog website with the following 3 command. Sounds simple right?
1 | $ npm install hexo-cli -g # Install Hexo |
Github Pages
Github Pages is a hosting service provided by GitHub. You can host static website for free by the following steps:
- Create a repository called
<your github username>.github.io
. - Push the files into the repository
main/master
branch. - In the repository, go to Settings > Pages > Source, change the source to Github Actions.
- Create file
.github/workflows/pages.yml
with the following contents and push tomain/master
(you may need to check your node.js version and fill into the file below):
1 | name: Pages |
- Done! you have create a blog website on
<your github username>.github.io
.