Skip to content

Strappazzon/jekyll-spoiler

RubyGems Logo
jekyll-spoiler

Jekyll support for spoilers

Installation

Add one of these lines to your Gemfile:

# always use the latest version
gem 'jekyll-spoiler'

# use pessimistic lock
gem 'jekyll-spoiler', '~> 1.0'

# fetch gem from git
gem 'jekyll-spoiler', git: 'https://github.com/Strappazzon/jekyll-spoiler.git', tag: '1.0.0'

Then execute bundle install to install the Gem.

Getting Started

  1. Use the Liquid filter and/or tag in your website

    • Use this to add spoiler text:

      {{ "Lorem ipsum dolor sit amet." | spoiler }}
    • Use this to add collapsible spoiler text:

      {% spoiler %}
        Lorem ipsum dolor sit amet, consectetur adipiscing elit.
        Ut enim ad minim veniam, quis nostrud exercitation ullamco.
      {% endspoiler %}
      
      {% spoiler title="Spoilers Ahead!" %}
        Lorem ipsum dolor sit amet, consectetur adipiscing elit.
        Ut enim ad minim veniam, quis nostrud exercitation ullamco.
      {% endspoiler %}
  2. Style the spoiler using CSS.

About

πŸ’Ž Jekyll support for spoiler text as Liquid filter and tag

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Languages