Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blocklune/hexo-blockquote2note
A Hexo plugin that renders blockquotes to note tag in NexT theme.
https://github.com/blocklune/hexo-blockquote2note
blog hexo markdown next-theme
Last synced: about 2 months ago
JSON representation
A Hexo plugin that renders blockquotes to note tag in NexT theme.
- Host: GitHub
- URL: https://github.com/blocklune/hexo-blockquote2note
- Owner: BlockLune
- License: gpl-3.0
- Created: 2024-01-29T08:51:28.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-05-22T06:02:16.000Z (8 months ago)
- Last Synced: 2024-11-27T12:38:41.198Z (about 2 months ago)
- Topics: blog, hexo, markdown, next-theme
- Language: TypeScript
- Homepage:
- Size: 80.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-blockquote2note
A Hexo plugin that renders blockquotes to [the note tag of the NexT theme](https://theme-next.js.org/docs/tag-plugins/note).
You may first edit your `_config.next.yml` to enable all features of the note tag. For example, this is mine:
```yaml
note:
style: flat
icons: true
```## Syntax
Surround the blockquotes that you want to transform to notes with `` (HEAD) and `` (TAIL), and they will be rendered as the note tags.
For example:
```md
> This is an example blockquote.
```
will be rendered as:
```md
{% note %}
This is an example blockquote.
{% endnote %}
```Configuration is supported.
For example:
```md
> This is an example blockquote.
```
will be rendered as:
```md
{% note default no-icon Test %}
This is Line 1 of this blockquote.
{% endnote %}
```After v1.1.0, purely blank lines between HEAD and TAIL are allowed. So it's also OK to use like:
```md
> This is an example.
```
> [!IMPORTANT] > **Keep those commas**, even if an option is empty.
> For example: ``.> [!CAUTION]
> Nested blockquotes are NOT supported.## Installation
```bash
npm install hexo-blockquote2note --save
```## Development
### Setup
```bash
git clone --depth=1 [email protected]:BlockLune/hexo-blockquote2note.git
pnpm install
```### Test
```bash
pnpm test
```> [!CAUTION]
> Node v21 may not show correct line numbers in stack traces when testing. See [this](https://github.com/BlockLune/hexo-blockquote2note/issues/1) issue.