read

Steps to set up personal blog website in Github

Install Jekyll and related environments follow the instruction strictly here.

Before finally call build function of Jekyll, you should follow these steps to let it run successfully on Windows system.

  1. Add your repository name with organization to your _config.yml, like: repository: henry/henrydf.github.io. See it from here

  2. About “GitHub Metadata warning”, you should follow these steps as describe in this site:

    2.1 GitHub Metadata is a gem required by Jekyll. We need a GitHub personal token to make it work. Follow the excellent guide on GitHub to create a token, copy it to a safe place. Now, create new environment variable in your system named JEKYLL_GITHUB_TOKEN with the value pasted from the created token.

    2.2 Now, down load the .pem file from here. Then, create another environment variable called SSL_CERT_FILE pointing to the location of downloaded .pem file.

You can also check this video out.

Create contents of the blog website

The Github pages blog system is heavily based on the Github repository. Any new posted posts should be placed in _posts folder, and give a specific file name date YYYY-MM-DD-name-of-post.markdown.

Any posted articles will be automatically updated by Github pages after you push them to your Github repository.

Grab particular posts in the blog website

If you want to collect some particular posts in a page, code work wouldn’t be avoided. The code below will collect all posts have category type poem, and the post date will also be rendered:

<ul>
	{% for post in site.posts %} 
		{% if post.categories contains 'poem' %}
		<li>
			<a href="{{ post.url }}">{{ post.title }}</a>
			<span>({{ post.date | date:"%Y-%m-%d" }})</span>
			{{ post.excerpt }}
		</li>
		{% endif %} 
	{% endfor %}
</ul>

Keep update of the resource

You should always update functions to keep your Jekyll resources up to date.

If you followed our setup recommendations and installed Bundler, run bundle update github-pages or simply bundle update and all your gems will update to the latest versions.

If you don’t have Bundler installed, run gem update github-pages

Blog Logo

Honglei Han 韩红雷


Published

Image

Honglei Han 韩红雷的主页

Honglei Han from CUC 中国传媒大学 游戏设计 韩红雷 科研信息 所带课程 个人介绍 开源项目 创作的部分古体诗 Unity 3D 游戏引擎 Game Engine 游戏开发 计算机图形学 虚拟现实 Virtual Reality 程序设计 Programming

Back to Overview