https://github.com/aimtao/hexo-fold
A plugin used to fold content block, modified from hexo-sliding-spoiler./ hexo 内容折叠插件
https://github.com/aimtao/hexo-fold
fold hexo
Last synced: 2 months ago
JSON representation
A plugin used to fold content block, modified from hexo-sliding-spoiler./ hexo 内容折叠插件
- Host: GitHub
- URL: https://github.com/aimtao/hexo-fold
- Owner: AimTao
- License: mit
- Created: 2023-08-04T20:19:24.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-08T03:49:43.000Z (almost 3 years ago)
- Last Synced: 2025-09-08T22:24:48.576Z (10 months ago)
- Topics: fold, hexo
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/hexo-fold
- Size: 2.11 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A plugin used to fold content block, modified from [hexo-sliding-spoiler](https://github.com/fletchto99/hexo-sliding-spoiler).
English | [中文](https://github.com/AimTao/hexo-fold/blob/master/README_CN.md)
+ [x] Simple, efficient and beautiful
+ [x] Support text, images, code blocks, and more
+ [x] Adaptive, ultra-large capacity
+ [x] User-defined color
## Demo

## Install
```bash
npm install hexo-fold --save
```
If hexo can't detect this plugin automatically, you need to modify the `plugins` section of `/_config.yml` manually, like:
```yaml
plugins:
- hexo-fold
```
If you want to customize the color, please add the following configuration.
This is optional, if not configured a default color will be used.
```yaml
fold:
bg_color: "#e5efe7"
board_color: "#e5efe7a1"
text_color: "#353535"
```
## Syntax
```plain
{% fold title %}
content
{% endfold %}
```
It will hide your text and place the title at the top with a dropdown/scroll up arrow.
## Example
### One word title
```plain
{% fold word %}
content
{% endfold %}
```
### Title containing spaces
```plain
{% fold "Several spaces in the title" %}
content
{% endfold %}
```