Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fletchto99/hexo-sliding-spoiler
A sliding spoiler for hexo
https://github.com/fletchto99/hexo-sliding-spoiler
Last synced: 2 months ago
JSON representation
A sliding spoiler for hexo
- Host: GitHub
- URL: https://github.com/fletchto99/hexo-sliding-spoiler
- Owner: fletchto99
- License: mit
- Created: 2016-10-03T02:27:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-04T11:36:46.000Z (over 1 year ago)
- Last Synced: 2024-09-24T01:28:26.278Z (4 months ago)
- Language: JavaScript
- Size: 468 KB
- Stars: 26
- Watchers: 2
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Inspired by [hexo-spoiler](https://github.com/unnamed42/hexo-spoiler)
## Install
```bash
npm install hexo-sliding-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:
```yaml
plugins:
- hexo-sliding-spoiler
```## Syntax
```plain
{% spoiler title %}
content
{% endspoiler %}
```It will hide your text and place the title at the top with a dropdown/scroll up arrow.
## Demo
![ ](img/example.gif)
## Example
### One word title
```plain
{% spoiler word %}
content
{% endspoiler %}
```### Title containing spaces
```plain
{% spoiler "Several spaces in the title" %}
content
{% endspoiler %}
```