The install of Jekyll is straightforward with the RubyGems package manager.
If you want to keep your local Jekyll installation in sync with the version running on Github Pages, then install the Github Pages gem instead of the Jekyll gem as follows.
Generate new Jekyll site directory from scratch
Make sure you create an empty tgirke.github.io repos on GitHub first.
Now you should see your web repos here: https://github.com/tgirke/tgirke.github.io. Your web site’s URL is this: http://tgirke.github.io.
By adding a gh-pages branch to an existing GitHub project repo one can generate a web site for any project. Here is how.
When the below directory structure is built using Jekyll, the output is a
static web site generated under the _site
folder. Since GitHub uses Jekyll
the static web site is automatically generated by GitHub. All source pages should be
kept in the project’s root directory or under _posts
. Never edit any pages
under _site
.
To render a Jekyll site locally, cd
into its directory (e.g. tgirke.github.io
)
and then run the following command.
Then direct your browser to: localhost:4000
To maintain drafts of pages that should be hidden on the life page, you can do
this in a _drafts
folder at the root level. Jekyll ignores the posts in the
drafts folder when building the site, but at the same time provides a
convenient command-line argument to include them in the build on your local
system.
To create code boxes with syntax highlighting support for your programming
language, use the following code tags (here for ruby):
{%
highlight ruby linenos %}...{% endhighlight %}
Dropping the linenos
option will eliminate the line numbering. Here is an example for
some R code:
Code hosted on GitHub Gist can be directly included in a page simply by providing the
corresponding identifier of the Gist entry in the Markdown source following this syntax:
{% gist c26daac0f647f1732a58 %}
More detailed information on code highlighting can be found here: