ZaneA / Liquid-GitHub

Custom Liquid block for iterating over a user's GitHub repositories.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Liquid-GitHub

A custom block for the Liquid templating engine (and therefore Jekyll) that allows you to iterate over a user's GitHub repositories and gists.

Usage

First of all, install the github_api gem which is used to actually interact with the GitHub v3 API.

gem install github_api

If you're using Jekyll you can simply clone this repository into your _plugins folder to begin using it, otherwise place it somewhere where it will be read by your application.

The actual usage is very simple. The block simply takes a GitHub user and provides a repos variable containing the API results.

{% github user: ZaneA %}
  {% for repo in repos %}
    <h3>{{ repo.name }}</h3>
    {{ repo.description | markdownify }}
  {% endfor %}
{% endgithub %}

You might like to check out my Liquid-Sort repository in order to easily sort these results by a key.

About

Custom Liquid block for iterating over a user's GitHub repositories.

License:MIT License


Languages

Language:Ruby 100.0%