This is the source repository for termux.github.io and its redirect site termux.org.
Install dependencies as explained at Using Jekyll with Pages, then run
bundle exec jekyll serve
to start a local server at http://localhost:4000.
- Add a new page file for the category at
pages/posts/<category_name>.html
with the following contents. Replace<category_name>
with the actual name for the category in the file name and front matter. Thecategory_name
variable is used bycategory.html
to load posts for the category. Checkgeneral.html
for thegeneral
category as a sample.
---
layout: default
title: <category_name> Posts
permalink: /posts/<category_name>
category_name: <category_name>
---
{% include category.html %}
- Add
[<category_name>](/posts/<category_name>)
link to category inposts.md
like General. The link url must match thepermalink
defined in category page above.
Check jekyll docs and github docs for details.
- Add the file for the post under the directory for the category at
_posts/<category_name>/YYYY-MM-DD-POST_TITLE.md
. For example, by creating the file_posts/general/1970-01-01-post-title.md
, jekyll will automatically create a route for the post atgeneral/1970/01/01/post-title.html
. Also make sure to set thecategory
in the front matter and also ensure its the same as category directory name under the_path
directory, otherwise jekyll will not add the category tosite.categories
used bycategory.html
and the posts won't show for the category.
---
layout: post
title: "Post Title"
category: <category_name>
---
Post Content
-
Add any asset files used by the post under the
assets/posts/<category_name>/YYYY-MM-DD-POST_TITLE
directory, likeassets/general/1970-01-01-post-title
and link to them with[Text Asset](/assets/general/1970-01-01-post-title/asset.txt)
or![Image Asset](/assets/general/1970-01-01-post-title/asset.png)
. Check jekyll docs for more. -
Ensure that the first paragraph of the post is a just a short description of the post since that text will show in the posts list for the category. This is done by setting
show_excerpts
totrue
in_config.yml
and used bycategory.html
. Check jekyll docs for more info.