Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Jekyll plugin to propagate the site.github namespace and set default values for use with GitHub Pages.
GitHub Metadata is a Jekyll plugin that propagates the site.github namespace and sets default values so GitHub Pages builds work out of the box.
GitHub Metadata is a Ruby gem and Jekyll plugin that injects repository information into your Jekyll site under the site.github namespace. It runs on any Jekyll build or serve command, reads metadata from the GitHub repository using the Octokit library, and sets fallback values for site.title, site.description, site.url, and site.baseurl when they are not already defined. The project is maintained by the Jekyll team and is the mechanism that powers GitHub Pages' automatic site.github data.
site.github namespace — Exposes repository metadata such as owner, name, tagline, and other GitHub fields as a structured object usable in templates.site.title to the repository name, site.description to the repository tagline, site.url to the GitHub Pages domain (cname or user domain), and site.baseurl to the project name for project pages when none are set.gem "jekyll-github-metadata" to your Gemfile and list jekyll-github-metadata under plugins in _config.yml, then run bundle install.site.github to display repository info without writing their own GitHub API calls.site.github without manual configuration.site.url (the Pages domain) and site.baseurl (the project name) so asset links and canonical URLs work on project pages.Install the gem and add it as a Jekyll plugin. During each build or serve, the plugin queries the GitHub API via Octokit and injects the resulting metadata into the site.github variable, then fills in any missing site configuration values. Authentication can be added for higher API limits or private repositories.
Yes, the plugin is open source under the Jekyll project and available as a Ruby gem.
For Jekyll versions earlier than 3.5.0, use the gems key in _config.yml instead of plugins.
The plugin exposes the full GitHub repository metadata object as site.github, including fields like the repository name, description, URLs, and other API properties.
