The website is accessible at https://onefootball.github.io/. It uses the GitHub Pages system to publish static pages generated with Jekyll. The installation and configuration has been done with that tutorial http://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/.
- All blog posts are in the
_posts/
directory. The naming pattern should beYYYY-MM-DD-$title.md
. - If you want to tweek the theme, checkout the markup in
_layouts/
and the CSS/SASS in_sass
- Images should be stored in
images/
and grouped by date (YYYY-MM). - Linking to images from a post is done with the
site.baseurl
variable:![_config.yml]({{ site.baseurl }}/images/2015-07/hacker.jpg)
- fork this repository
- clone your fork locally
- branch, do your changes, commit, and open a pull request to
Onefootball:master
See https://help.github.com/articles/using-jekyll-with-pages/#installing-jekyll for a full documentation.
In a terminal, run this:
ruby -v
If your version is > 2.1
everything's fine, if not you'll need to update Ruby.
On Mac, first you'll need to install brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then you can install RVM (Ruby Versions Manager)
\curl -L https://get.rvm.io | bash -s stable --ruby
And finally update your Ruby
rvm install 2.1.5 --autolibs=enable
source /Users/{your_user_name}/.rvm/scripts/rvm
See a full documentation here https://coderwall.com/p/4imsra/upgrading-ruby-to-2-1-0-and-above-in-mavericks
On Linux (Debian):
rvm install 2.1.5 # needs >2
ruby --version # if necessary `$ rvm use 2.1.5`
On Windows: TODO You have to have Python with Pygments installed and globally accessible.
$ cd $project_dir
$ gem install bundler
$ bundle install
You're ready!
$ git checkout master
$ bundle exec jekyll serve
Then open your browser on http://localhost:4000
.
Post have to be written using the GitHub flavored Markdown. If you have not installed Jekyll locally you can use StackEdit.io.
If it's your first contribution, consider adding your name to the _data/authors.yml
file:
yourname:
name: Yøür Nąmé
twitter: YourNameOnTwitter
You can then use the key yourname
in the author_id
field of your post.
When creating a post remember to:
1. Add the header tags to your post.md
tags: [tag1, tag2, tag3]
2. Add your entry to the tag database
Foreach tag you use in your post, check the _data/tags.yml
and add the items you need.
- slug: tag1
name: Fancy Tag 1
- slug: tag2
name: Cool Descr Tag 2
3. Create the index for your tags
Check the tag/
folder and create a file mytagslug.md
for each tag you need:
---
layout: blog_by_tag
title: 'Articles by tag: ${mytagslug}'
tag: ${mytagslug}
permalink: /tag/${mytagslug}/
---