jekyll-kw-sri 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2973377b85291043610eda6a787a2e0b90cd8a5bacc1e97307e12141d506922c
4
- data.tar.gz: 0ce8ffe029793579111eb924cd2da6ae01542b597a8a8a1203275eefa2cb4302
3
+ metadata.gz: fefa9c1ae5b7c722c5a2fe0b530b0c58c7e612f93e54fbf57adab68f88d0ff66
4
+ data.tar.gz: 1493f4d4213256b518e7d6ffc2fdca9e3f5d789b746029c7e8f2ee8afb2ebd7e
5
5
  SHA512:
6
- metadata.gz: 562282c803da6ee51304bc436d2186b5f06e9ca66dca84453207570b9db17881be5d73ffbc5fc0bffaeaf3be77e2d56d2cd99f415a0295536e98640554850c0c
7
- data.tar.gz: e6c3f3650a781d0391729bac08fc3ebe812c46fee4fe81b2a836d3810da207000b08a51bd3cdfec7eb5a54a45bd70d5d3494cef6c271cdda165fa9256b390ba5
6
+ metadata.gz: ef3d181dc9f827fc0a026a021e661ce2bfbb1f653125e5adf43f09e0937a1c87053ed96cfb5f40a7423131ed79ceaae9961d3eef4783bdad683efbb3d1dea9dd
7
+ data.tar.gz: 6938b41fe3adad31e1b4bd206d2d4b317ae24c895ae41a8e2aa33feed254708a64493cd0db01bc0b35c5da96443c6e005c9894d6a4bb65704ccef3caefce0797
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # jekyll-kw-sri
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/jekyll-kw-sri.svg)](https://badge.fury.io/rb/jekyll-kw-sri)
4
+
3
5
  A plugin for jekyll to calculate [Subresource Integrity][Wikipedia SRI] (SRI) hashes for CSS (even SCSS and SASS) and JS files during build time.
4
6
 
5
7
  > **Subresource Integrity** (SRI) is a security feature that enables browsers to verify that resources they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched resource must match.
@@ -28,9 +28,6 @@ module Jekyll
28
28
  def render(context)
29
29
  # return '' unless context.registers[:page]['sri']
30
30
 
31
- # # Read the global configuration
32
- # @sri_config = context.registers[:site].config['kw-sri'] || {}
33
-
34
31
  cache_compiled_scss(@file, context, lambda {
35
32
  if context.nil? || context.registers[:site].nil?
36
33
  puts 'WARNING: There was no context, generate default site and context'
@@ -38,6 +35,8 @@ module Jekyll
38
35
  context = Liquid::Context.new({}, {}, { site: site })
39
36
  else
40
37
  site = context.registers[:site]
38
+ # Read the global configuration
39
+ @sri_config = context.registers[:site].config['kw-sri'] || {}
41
40
  end
42
41
 
43
42
  converter = site.find_converter_instance(Jekyll::Converters::Scss)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllKwSri
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-kw-sri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Karg