My Point of View
⇒ Written by yangby
Last weekend, I tried GitHub Pages.
I’ve tried a lot of online services to build a blog in past several years, such as Google App Engine, Red Hat OpenShift v2, Heroku.
GitHub Pages is more simple than a PaaS, or running a own web server in a VPS. I can focus on the content of my posts.
Since I want to setup a personal site, I just create a repository named
USERNAME.github.io.
The I clone the new repository:
git clone https://github.com/USERNAME/USERNAME.github.io
Write a markdown file named index.md, add to the repository, commit, then
push to github.
DONE!
Create a file Gemfile:
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
Install GitHub Pages Ruby Gem:
bundle install
Creating a personal access token in Developer settings / New personal access token
with only the public_repo scope selected, then:
export JEKYLL_GITHUB_TOKEN=YOUR_NEW_PERSONAL_ACCESS_TOKEN
Use a personal access token can fix the issue:
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
Run GitHub Pages in local:
bundle exec jekyll serve --incremental
More details can found in follow pages:
There are 13 GitHub Pages Official Supported Themes:
Add a new line to _config.yml, with the theme name:
theme: jekyll-theme-primer
Add a new line to _config.yml, with the theme repo:
remote_theme: AUTHOR/REPOSITORY@BRANCH_OR_TAG_OR_COMMIT
Add Math Support to Jekyll, just need add a new line to your posts:
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/VERSION/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}.\)
Maxwell’s Equations:
\begin{align}
\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}}
\nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho
\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}}
\nabla \cdot \vec{\mathbf{B}} & = 0
\end{align}
More details can found in follow pages: