0 Prerequisite
- Markdown writing skills
- A computer💻 and access to the internet🌏
- Enough time: ⏰about 60 mins(exclude the time choosing themes)
Github Pages + Jekyll
1 Creating Github Repository
- The repository’s name must be
your-username.github.io
(remember to add aREADME.md
or initialize the repo: set main branch) - In repository’s settings: change Github Pages -> source -> main
2 Choosing Your Favourite Jekyll Theme
Visit 🔗http://jekyllthemes.org/ to look through
3 Install Jekyll and Ruby
3.1 Install Ruby & RubyGems
- Visit 🔗https://rubyinstaller.org/downloads/ to download installer
- Double click the installer to start installation.
The install location can not have space!!!
Keep all the options ticked: like add to path, install msys2…
After the install finishes, a cmd window will pop up, just press enter or 3 to continue installing msys2.( This could take some time.) If the installation fails, runridk install
to reinstall.
- Download from 🔗https://rubygems.org/pages/download to install RubyGems
- Unzip the downloaded file in step3, enter the folder using
cd <folderpath>
in cmd
3.2 Install jekyll & Github Pages
- Run
gem install bundle
- Run
gem install jekyll
- Run
gem install jekyll-paginate
- Run
jekyll -v
to verify installation: should display something like version - Run
gem install github-pages
to install github pages
3.3 Add Environment Variables & Start Jekyll Project Locally
- Open your computer’s envrionment path and add your ruby path with \bin, save and exit.
- Run
bundle exec jekyll serve
to start locally
4 Import Template
- Copy every file in the template into your own repository
- Run
bundle install
- Run
bundle exec jekyll serve
to start locally
Github Pages + Hexo
1 Creating Github Repository
Same as above
2 Install Node.js & Git
Recommand install nvm to change node version flexibally.
About how to install nvm please search the friendly Internet.
3 Install hexo & Initialize
- Run the command
npm install -g hexo-cli
to install hexo - Run
hexo init
in an empty folder to set up the files
4 How to release
Choose your theme.
- Run
hexo generate
to generate file - Run
hexo server
to preview locally - Run
hexo depoly
to release to github
Before deploy, remember to set _config.yml file
1 | deploy: |