Introducing hexo-blockquote2note
Published at 2024-02-04
Licensed under CC BY-NC-SA 4.0
software-engineering
tool
markdown
hexo
next-theme
I use Hexo with the NexT theme to build my blog. I wrote this plugin to solve a pain point I’ve encountered in this workflow.
The note tag feature of the NexT theme helps me insert colorful note cards into my posts. However, it’s not raw markdown syntax. It looks ugly when I open the raw markdown of my post in an editor.
So I made hexo-blockquote2note. By using code comments, I can flag some quote blocks to be treated as the note tags, while still keeping them as normal quote blocks when I open the raw markdown in an outside editor.
Installation
npm install hexo-blockquote2note --save
Examples and Previews
Note
The following examples can’t be rendered in a non-hexo environment. So you are not visiting the hexo version of the blog, you can’t see it.
<!--blockquote2note-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!
<!--blockquote2note:default,,-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!
<!--blockquote2note:primary,,-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!
<!--blockquote2note:info,,-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!
<!--blockquote2note:success,,-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!
<!--blockquote2note:warning,,-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!
<!--blockquote2note:danger,,-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!
<!--blockquote2note:default,no-icon,-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!
<!--blockquote2note:default,no-icon,-->
> #### Header
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Header
Welcome to using hexo-blockquote2note!
<!--blockquote2note:default,no-icon,This is a summary-->
> Welcome to using [hexo-blockquote2note](https://github.com/BlockLune/hexo-blockquote2note)!
<!--end-blockquote2note-->
Welcome to using hexo-blockquote2note!