1.1.1 • Published 3 months ago

hexo-blockquote2note v1.1.1

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 months ago

hexo-blockquote2note

A Hexo plugin that renders blockquotes to the note tag of the NexT theme.

You may first edit your _config.next.yml to enable all features of the note tag. For example, this is mine:

note:
  style: flat
  icons: true

Syntax

Surround the blockquotes that you want to transform to notes with <!--blockquote2note--> (HEAD) and <!--end-blockquote2note--> (TAIL), and they will be rendered as the note tags.

For example:

<!--blockquote2note-->
> This is an example blockquote.
<!--end-blockquote2note-->

will be rendered as:

{% note %}
This is an example blockquote.
{% endnote %}

Configuration is supported.

For example:

<!--blockquote2note:default,no-icon,Test-->
> This is an example blockquote.
<!--end-blockquote2note-->

will be rendered as:

{% 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:

<!--blockquote2note-->

> This is an example.

<!--end-blockquote2note-->

!IMPORTANT Keep those commas, even if an option is empty.
For example: <!--blockquote2note:,,Test-->.

!CAUTION Nested blockquotes are NOT supported.

Installation

npm install hexo-blockquote2note --save

Development

Setup

git clone --depth=1 git@github.com:BlockLune/hexo-blockquote2note.git
npm install

Test

npm test

!CAUTION Node v21 may not show correct line numbers in stack traces when testing. See this issue.

1.1.1

3 months ago

1.1.0

3 months ago

1.0.0

3 months ago