jekyll-octicons 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1d9b47ad40d15aed1741199ef604f66f512aef95
4
- data.tar.gz: 6202a1ce698d441e92ff6fdd7fd9ff840754c19b
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ODg3ZjVlMjI0YWFjZDBjZGY2NTE4YTE0MjczOTVlOWU2YTU3ODkyMA==
5
+ data.tar.gz: !binary |-
6
+ ZDhjNDI1OTMwYTU5YThmNjgzMWY0MjY5NWFlZWYwZjM5Zjc0ZDBkNA==
5
7
  SHA512:
6
- metadata.gz: d97a76cf5bd48d96191ade4563f88937f92a62e84936bdf98944801db20b15ef502a4d95dba8894be1f967e7e670ac2998bf82f48191faab963c46f64a927dec
7
- data.tar.gz: 6da40d30d4d15dd68b2345b8ff4a61483736fbb89637b1387cc1d6eba4f44846e281cc6d6c83d1d7843d969e515549c2e9c893efccf433b51ebfe27cf087a740
8
+ metadata.gz: !binary |-
9
+ NGE2YmYzYWZmNjliMzExMTkzYTYzYWFkZmM4NTFkYzY3MzYxNjEyMWQxZmJh
10
+ Nzc4Njc4MTRmMGExNjgzYjU3ODM0OGQxN2Y5YjZhODMxYzA3MDA0Y2E2NzYx
11
+ NTBlMjQyMDJiZDJkYzA0NmVkNTMzYzQxYzkzODI2YTRiMzI0ZDc=
12
+ data.tar.gz: !binary |-
13
+ NDA2NzEyMGQxY2I0MjZiZDNmNjg5YzZkNjIxMmVlNDRhZWNmY2E3NGQwNDcw
14
+ ZGQ3ZDQ4ZDcyOTc1ZGIzOWRkYTYyMjk1M2I1ZDI4ZmFiNmQ4NDg5NDc1ZGQx
15
+ ZTk1NzQ3ODZkNzJjODVlOGZjOWQ1ZDE3NWEzZDk2MDQ1MDIwNTg=
data/README.md CHANGED
@@ -28,6 +28,8 @@ This jekyll liquid tag, is a plugin that will let you easily include svg [octico
28
28
  {% octicon alert size:large class:"right left" aria-label:hi %}
29
29
  ```
30
30
 
31
+ The minimum CSS you'll need in your jekyll site is in the [octicons][octicons] repository. You can also npm install that package and include `build/octicons.css` in your styles.
32
+
31
33
  ## Documentation
32
34
 
33
35
  For a full list of options available, see the [octicons_gem documentation](https://github.com/primer/octicons_gem#documentation)
@@ -1,12 +1,18 @@
1
1
  require 'octicons'
2
2
  require 'jekyll-octicons/version'
3
3
  require 'liquid'
4
+ require 'jekyll/liquid_extensions'
4
5
 
5
6
  module Jekyll
6
7
  class Octicons < Liquid::Tag
8
+ include Jekyll::LiquidExtensions
9
+
7
10
  # Syntax for the octicon symbol
8
11
  Syntax = /\A(#{Liquid::VariableSignature}+)/
9
12
 
13
+ # For interpoaltion, look for liquid variables
14
+ Variable = /\{\{\s*([\w]+\.?[\w]*)\s*\}\}/i
15
+
10
16
  # Copied from Liquid::TagAttributes to allow dashes in tag names:
11
17
  #
12
18
  # {% octicon alert area-label:"Hello World!" %}
@@ -15,10 +21,14 @@ module Jekyll
15
21
 
16
22
  def initialize(tag_name, markup, options)
17
23
  super
24
+ @markup = markup
18
25
  @options = string_to_hash(markup)
19
26
  end
20
27
 
21
28
  def render(context)
29
+ @markup.scan Variable do |variable|
30
+ @options = string_to_hash(@markup.gsub(Variable, lookup_variable(context, variable.first)))
31
+ end
22
32
  return nil if @options[:symbol].nil?
23
33
  ::Octicons::Octicon.new(@options).to_svg
24
34
  end
@@ -3,6 +3,6 @@ module Liquid; class Tag; end; end
3
3
 
4
4
  module Jekyll
5
5
  class Octicons < Liquid::Tag
6
- VERSION = '1.0.0'.freeze
6
+ VERSION = '1.1.0'.freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-octicons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2016-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: octicons
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  description: A jekyll liquid plugin that makes including svg Octicons simple.
@@ -45,10 +45,10 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - lib/jekyll-octicons/version.rb
49
- - lib/jekyll-octicons.rb
50
48
  - LICENSE
51
49
  - README.md
50
+ - lib/jekyll-octicons.rb
51
+ - lib/jekyll-octicons/version.rb
52
52
  homepage: https://github.com/primer/jekyll-octicons
53
53
  licenses:
54
54
  - MIT
@@ -59,17 +59,17 @@ require_paths:
59
59
  - lib
60
60
  required_ruby_version: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - ">="
62
+ - - ! '>='
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
67
+ - - ! '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
71
  rubyforge_project:
72
- rubygems_version: 2.0.14.1
72
+ rubygems_version: 2.4.5
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Octicons jekyll liquid tag