Jekyll plugin for Netlify
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test test/test_netlify.rb: Remove assert Integer Mar 2, 2018
.gitignore Initial commit Nov 10, 2017
.rubocop.yml
.travis.yml
Gemfile jekyll-netlify 0.1.0 Nov 10, 2017
LICENSE
README.md
Rakefile jekyll-netlify 0.1.0 Nov 10, 2017
jekyll-netlify.gemspec

README.md

Build Status Gem Version

Jekyll::Netlify

Expose Netlify deploy information to Jekyll templates and set site.environment=production.

{{site.netlify.branch}} # => Will return the branch name
{{site.netlify.pull_request.url}} # => Will return http://github.com/foo/bar/pulls/23

Installation

Add to your Gemfile:

group :jekyll_plugins do
  gem "jekyll-netlify"
end

For older versions of Jekyll, add to your _config.yml:

plugins:
  - jekyll-netlify

Usage

This plugin adds hash of site.netlify containing Build Environment information:

  • repository_url (git@...)
  • branch
  • pull_request: (false; true for BitBucket; or Hash for GitHub and GitLab)
    • id
    • url
  • head
  • commit
  • context
  • deploy_url
  • url
  • deploy_prime_url
  • webhook
    • title
    • url
    • body