0.0
The project is in a healthy, maintained state
This plugin provides spoiler text support for Jekyll with a Liquid filter and tag.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 4.4
~> 2.5
~> 4.0
 Project Readme
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.
    An example can be found here: docs/_sass/_spoiler.scss.