The purpose of this post is to help you make sure all of HTML elements can display properly. If you use CSS reset, don’t forget to redefine the style by yourself.

This post contains 3 tags. Make sure your theme can display all of the tags.

This is a link post. Clicking on the link should open Google in a new tab or window.

This post contains 2 categories. Make sure your theme can display all of the categories.

This post is used for testing tag plugins. See docs for more info.

The following contents should be invisible in home/archive page.

One of the rewards of switching my website to Jekyll is the ability to support MathJax, which means I can write LaTeX-like equations that get nicely displayed in a web browser, like this one \( \sqrt{\frac{n!}{k!(n-k)!}} \) or this one \( x^2 + y^2 = r^2 \).

Nunc dignissim volutpat enim, non sollicitudin purus dignissim id. Nam sit amet urna eu velit lacinia eleifend. Proin auctor rhoncus ligula nec aliquet. Donec sodales molestie lacinia. Curabitur dictum faucibus urna at convallis. Aliquam in lectus at urna rutrum porta. In lacus arcu, molestie ut vestibulum ut, rhoncus sed eros. Sed et elit vitae risus pretium consectetur vel in mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi tempus turpis quis lectus rhoncus adipiscing. Proin pulvinar placerat suscipit. Maecenas imperdiet, quam vitae varius auctor, enim mauris vulputate sapien, nec laoreet neque diam non quam.

记录在构建和使用过程中遇到的有一些常见问题.

为 Jekyll 设置多个 post 文件夹 将博客迁移到 Jekyll 大半年后,对它基本熟悉了起来。Jekyll 最基本的目录结构是:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.
├── _config.yml
├── _data
|   └── members.yml
├── _includes
|   ├── footer.html
|   └── header.html
├── _layouts
|   ├── default.html
|   └── post.html
├── _posts
|   ├── 2017-01-19-hello-world.md
├── _sass
|   ├── _base.scss
|   └── _layout.scss
└── index.html  # Or index.md
└── about.html # Or about.md

这其中,比较重要的文件/文件夹有:

  • _config.yml:配置文件,填写一些配置信息。
  • _includes:在其中添加一些可以在 _layout 和 _posts 中复用的文件。
  • _layouts:模板文件,_post 中使用 YAML Front Matter 使用这些模板文件。
  • _posts:所有文章都放在这里,注意 文章有特定的文件命名规则,使用 Markdown 格式,并以 YAML Front Matter 作为开头。