Skip to content

Latest commit



88 lines (79 loc) · 3.21 KB

File metadata and controls

88 lines (79 loc) · 3.21 KB

Using site.github

Common repository information, such as the project name and description, is available to Jekyll sites using jekyll-github-metadata including GitHub Pages sites.


Repository metadata is exposed to your Jekyll site's configuration in the site.github namespace.

Simply, reference any of the below keys as you would any other site configuration value present in your _config.yml file, prefacing the key with site.github.

For example, to list a project's name, you might write something like The project is called {{ site.github.project_title }} or to list an organization's open source repositories, you might use the following:

{% for repository in site.github.public_repositories %}
  * [{{ }}]({{ repository.html_url }})
{% endfor %}

Available repository metadata

The following sample information is exposed to Jekyll templates in the site.github namespace:

    "versions": {
        "jekyll": <version>,
        "kramdown": <version>,
        "liquid": <version>,
        "maruku": <version>,
        "rdiscount": <version>,
        "redcarpet": <version>,
        "RedCloth": <version>,
        "jemoji": <version>,
        "jekyll-mentions": <version>,
        "jekyll-redirect-from": <version>,
        "jekyll-sitemap": <version>,
        "github-pages": <version>,
        "ruby": <version>"
    "hostname": "",
    "pages_hostname": "",
    "api_url": "",
    "help_url": "",
    "environment": "dotcom",
    "pages_env": "dotcom",
    "public_repositories": [ Repository Objects ],
    "organization_members": [ User Objects ],
    "build_revision": "cbd866ebf142088896cbe71422b949de7f864bce",
    "project_title": "metadata-example",
    "project_tagline": "A GitHub Pages site to showcase repository metadata",
    "owner_name": "github",
    "owner_url": "",
    "owner_gravatar_url": "",
    "repository_url": "",
    "repository_nwo": "github/metadata-example",
    "repository_name": "metadata-example",
    "zip_url": "",
    "tar_url": "",
    "clone_url": "",
    "releases_url": "",
    "issues_url": "",
    "wiki_url": "",
    "language": null,
    "is_user_page": false,
    "is_project_page": true,
    "show_downloads": true,
    "url": "", // (or the CNAME)
    "baseurl": "/metadata-example",
    "contributors": [ User Objects ],
    "releases": [ Release Objects ],
    "latest_release": [ Release Object ],
    "private": false,
    "archived": false,
    "disabled": false,
    "license": {
      "key": "mit",
      "name": "MIT License",
      "spdx_id": "MIT",
      "url": ""
    "source": {
      "branch": "gh-pages",
      "path": "/"