module Jekyll::Filters::HashedColours

The jekyll implementation of the colour tag

Public Instance Methods

# File _plugins/colour-tags.rb, line 43
def cache
  @@cache ||= Jekyll::Cache.new('ColorTags')
end

colour_tag will turn some contents into a set of CSS variables for use in CSS.

Examples:

<span class="label label-default tutorial_tag" style="{{ tag | colour_tag }}">{{ tag }}</span>
# File _plugins/colour-tags.rb, line 53
def colour_tag(contents)
  cache.getset(contents) do
    Gtn::HashedColours.colour_tag(contents)
  end
end