No description, website, or topics provided.
Python Makefile
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 5 commits behind kura:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pelican_githubprojects
.gitignore
LICENSE
MANIFEST.in
Makefile
README.rst
setup.cfg
setup.py

README.rst

Pelican Github Projects

Embed a list of your public GitHub projects in your pages.

Installation

To install pelican-githubprojects, simply install it from PyPI:

$ pip install pelican-githubprojects

Configuration

Enable the plugin in your pelicanconf.py

PLUGINS = [
    # ...
    'pelican_githubprojects',
    # ...
]

Add a setting with your GitHub username.

GITHUB_USER = 'kura'

Optionally specify the order in which projects appear. The choices for each parameter are provided at https://developer.github.com/v3/repos/#list-user-repositories.

GITHUB_USER_TYPE = "owner"
GITHUB_SORT_BY = "created"
GITHUB_DIRECTION = "desc"

Available data

name:The name of your project.
language:The language your project is written in, information on how GitHub detects languages is available here. It is GitHub that detects the language, not this plugin. So please, no issues about that.
description:The description of your project (as set on GitHub.)
homepage:The homepage of your project (as set on GitHub.)
github_url:The web page URL of your project on GitHub (not the GIT or API URL.)

Usage

In your templates you will be able to iterate over the github_projects variable, as below.

{% if GITHUB_USER %}
    <h1>Projects</h1>
    {% for project in github_projects %}
        <h2>{{ project.name }} <sup>({{ project.language }})</sup></h2>
        {% if project.description %}<p>{{ project.description }}</p>{% endif %}
        <p>
            {% if project.homepage %}<a href="{{ project.homepage }}">Homepage</a>{% endif %}
            <a href="{{ project.github_url }}">GitHub</a>
        </p>
    {% endfor %}
{% endif %}

License

MIT license.