Jekyll is a framework for generating static websites out of simple structured content (basically Markdown and HTML files, with a minimal amount of metadata)
_config.yml
is where the list of contributors to the blog is maintained. It should be trivial to add an author by just duplicating an existing one.- The content of the website lives under
_posts
. Content is grouped in folders (api
,blog
, ...) for the sake of organization but the physical location of the files in the_posts
folder is not actually important. - At the moment we rely on one external plugin for generating author pages. This may be removed in a later version, because it prevents to rely on the Jekyll support in Github Pages. It means that when you contribute to the website you will need to publish the new generated website (see "Publishing your changes" below).
git clone https://github.com/AirVantage/airvantage.github.io.git
The repository contains two branches:
source
is where the whole source of the website lives, that is all the jekyll templates and the actual content (blog posts, tutorials, ...)master
is the generated website. You should not work on this branch. It is automatically updated as part of the publication process (see "Publishing you changes" section)
It should be really easy for you to add your own blog post, tutorial, API example, ...
The Jekyll "front-matter" (what is at the beginning at every content file) is used to set attributes that are common to all kinds of posts, plus some others that are specific.
category
: must be present and set to eitherapi
,blog
,projects
, ortutorials
(reminder: the fact that content is arranged in sub-folders under_posts
has no influence on the actual categorization).comments
:true
orfalse
, depending on whether Disqus comments should be enabled or not for this content.
- Create a new file in
_posts/blog
, following the same naming pattern as existing files. - In addition to
category
andcomments
, you should set the following attributes in the front matter:layout
: must be set topost
title
: title of your blog postauthor
: the username of the author of the blog post as per the _config.yml authors list
- Create a new file in
_posts/api
, following the same naming pattern as existing files. - In addition to
category
andcomments
, you should set the following attributes in the front matter:short
: a two-letters shortcut (such as "Ja") that will be displayed in the periodic tablegithub_repo
: the URL of the Github repo hosting the sample
- Create a new file in
_posts/projects
, following the same naming pattern as existing files. - In addition to
category
andcomments
, you should set the following attributes in the front matter:title
: the title of your blog postauthor
: the username of the author of the project as per the _config.yml authors listimg
: the name of the image to be found in/resources/img/projects/
for representing this projectgithub_repo
: the URL of the Github repo hosting the project
- Create a new file in
_posts/tutorials
, following the same naming pattern as existing files. - In addition to
category
andcomments
, you should set the following attributes in the front matter:layout
: must be set todefault
title
: the title of the tutorialimg
: the name of the image to be found in/resources/img/tutorials/
for representing this tutorial
You need Ruby, RubyGems, and Jekyll.
See the Jekyll installation instructions.
Install RVM and run:
$ rvm --create --ruby-version ruby-1.9@airvantage.github.io
$ rvm use ruby-1.9.3-p484@airvantage.github.io
$ bundle
While you are working on your modifications, you can have jekyll doing its magic in the background and rebuilding the website as you modify the posts. For this, you just need to run jekyll serve -w
from the root folder.
When you are happy with your changes, you can publish the new sources and the new generated website
- Publish the new sources
- Commit you change(s) locally
git push origin source
- Generate and publish the new website in one line
rake publish