jekyll-heroicons 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ea6e91e6cb36a520dca76e702ba049bace4d58ca10d9b4e052835d0326c0152
4
- data.tar.gz: 2920e68dfc8f15f74915288bce410bd3ef9dd8cdfb02a3db977c9ef565f59846
3
+ metadata.gz: 1dae35ec57464428cb9ef7b5a914489ed06fa4f0f0be2ad43bacfd4845447b34
4
+ data.tar.gz: d577ef931e1ea5cae714f6a185f1666d870617e8eeceb8cdc43c6d07c9105b33
5
5
  SHA512:
6
- metadata.gz: f9903507c9e0ebb0ec11078792689b8f3aa82544583000934e066bb254e059cfe0595e067cf58303b1540e167d857f9004c632e79ca84f5cccc2dadfeea7d372
7
- data.tar.gz: 8cf3485c9eea35f1b84fd1d103ae14e3b259c5acb2d609ecd33cfc4ff5a4bc89a18217f5da8ecd7d150b3d5c70fc54298dc33bbaac50613e6346ff03640b742a
6
+ metadata.gz: 22753cd62b78f18d50b0619a5adb8de03d1a636129c3eba68d9bc8f857cc1770b54d114b1617de71e835b0df38024b2054c9857ce8bf170dd4adc341b6739dfd
7
+ data.tar.gz: 4bd29bcfc2442e0828a717e2430b8f9b915d0420a6ca8fbfda41231b8fa328fb5275f752a113c204c173b230652cd4d41d79972b9e2f4b36612ad78ca1687984
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Jekyll-Heroicons
2
2
 
3
+ ## 0.4.1
4
+ - Don't reload configuration on every change
5
+ - Improve comments and code around picking default variants.
6
+
3
7
  ## 0.4.0
4
8
  - Add default variant as solid.
5
9
  - Adding "disable_default_class" attribute to a tag, to avoid adding default classes to the icon.
data/README.md CHANGED
@@ -10,6 +10,8 @@ This gem has no official affiliation with Tailwind CSS or the Heroicons team. Ch
10
10
 
11
11
  This is heavily inspired by https://github.com/jclusso/heroicons
12
12
 
13
+ If you are looking to build a Jekyll website with Tailwind and no-build, take a look at [Jekyll CLI Template](https://github.com/skatkov/jekyll-tailwind-cli-template) that contains already this gem.
14
+
13
15
  ## Installation
14
16
 
15
17
  1. Add this to `Gemfile`:
@@ -79,7 +81,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
79
81
 
80
82
  ## Contributing
81
83
 
82
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jekyll-heroicons. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/jekyll-heroicons/blob/master/CODE_OF_CONDUCT.md).
84
+ Bug reports and pull requests are welcome on GitHub at https://github.com/skatkov/jekyll-heroicons. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/skatkov/jekyll-heroicons/blob/master/CODE_OF_CONDUCT.md).
83
85
 
84
86
  ## License
85
87
 
@@ -87,4 +89,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
87
89
 
88
90
  ## Code of Conduct
89
91
 
90
- Everyone interacting in the Jekyll::Heroicons project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-heroicons/blob/master/CODE_OF_CONDUCT.md).
92
+ Everyone interacting in the Jekyll::Heroicons project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/skatkov/jekyll-heroicons/blob/master/CODE_OF_CONDUCT.md).
@@ -5,6 +5,6 @@ module Liquid; class Tag; end; end
5
5
 
6
6
  module Jekyll
7
7
  class Heroicons < Liquid::Tag
8
- VERSION = "0.4.0"
8
+ VERSION = "0.4.1"
9
9
  end
10
10
  end
@@ -13,6 +13,9 @@ module Jekyll
13
13
  File.dirname(__dir__)
14
14
  end
15
15
 
16
+ # In case no variant is specified, use solid as default
17
+ DEFAULT_VARIANT = "solid"
18
+
16
19
  # Syntax for the heroicon symbol
17
20
  SYNTAX = /\A(#{Liquid::VariableSignature}+)/
18
21
 
@@ -44,7 +47,7 @@ module Jekyll
44
47
  private
45
48
 
46
49
  def config
47
- @config ||= begin
50
+ @@config ||= begin
48
51
  Jekyll.configuration.dig("heroicons")
49
52
  rescue NoMethodError
50
53
  {}
@@ -58,13 +61,14 @@ module Jekyll
58
61
  prepend_default_classes
59
62
  end
60
63
 
64
+ # This method checks if heroicons liquid tag has a variant specified. If not, it check default variant in the config file. If both of those are not defined, it falls back to the default variant.
61
65
  def variant(markup)
62
66
  if @options.key?(:variant)
63
67
  @options[:variant]
64
68
  elsif config["variant"]
65
69
  config["variant"]
66
70
  else
67
- "solid"
71
+ DEFAULT_VARIANT
68
72
  end
69
73
  end
70
74
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-heroicons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav (Stas) Katkov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-25 00:00:00.000000000 Z
11
+ date: 2024-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll