Skip to content
A spoiler tag for Hexo
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Install

npm install hexo-spoiler --save

If hexo can't detect this plugin automatically, you need to modify the plugins section of [path_to_your_site]/_config.yml manually, like:

plugins:
 - hexo-spoiler

Syntax

{% spoiler [text] %}

It will pixelate your text, and click to reveal. Click again to hide your text again.

But you need to add <br> manually if you want line breaks after/before it.

Preview

When you writes:

{% spoiler text %} 
{% spoiler ~~text~~ %}
{% spoiler *text* %}
{% spoiler **text** %}

You can’t perform that action at this time.