hexo-blockquote2note v1.2.1
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: trueSyntax
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 --saveDevelopment
Setup
git clone --depth=1 git@github.com:BlockLune/hexo-blockquote2note.git
pnpm installTest
pnpm test!CAUTION Node v21 may not show correct line numbers in stack traces when testing. See this issue.