The next tip is to use some advanced techniques that use the GitHub API.
GitHub provides some metadata when using Jekyll for GitHub Pages. This means that you can add certain keywords in the Jekyll templates and these will be rendered automatically.
For example, you could add the {{ site.github.project_title }}
variable, and the project title would be filled by GitHub automatically.
Following the example in the Introduction to Jekyll section of this chapter, we will add a new post to the Jekyll site. Firstly, head over the repository directory and make sure you are in the gh-pages
branch:
git checkout gh-pages
We will copy the default post to have it as a reference (the dates in your site will differ):
cp _posts/2015-08-03-welcome-to-jekyll.markdown _posts/2015-08-04- testing-github-metadata-with-jekyll.markdown
Open the new file and remove all contents, except for the following:
--- layout: post title: "Welcome to Jekyll!" date: 2015-08...