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
-
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 %}
-
-
Style the spoiler using CSS.
An example can be found here:docs/_sass/_spoiler.scss
.