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 +4 -4
- data/README.md +2 -0
- data/lib/jekyll-kw-sri.rb +2 -3
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fefa9c1ae5b7c722c5a2fe0b530b0c58c7e612f93e54fbf57adab68f88d0ff66
|
4
|
+
data.tar.gz: 1493f4d4213256b518e7d6ffc2fdca9e3f5d789b746029c7e8f2ee8afb2ebd7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
[](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.
|
data/lib/jekyll-kw-sri.rb
CHANGED
@@ -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)
|
data/lib/version.rb
CHANGED