Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.