pirtleshell / hexo-include

A Hexo plugin for including raw content of any text file into a post
MIT License
18 stars 5 forks source link

use code block and include at same time #1

Open sonnyhcl opened 5 years ago

sonnyhcl commented 5 years ago

Actually, I met the same question as you asked in https://github.com/hexojs/hexo/issues/2201. I want to insert a code file as a collapsed spoiler and it seems difficult to deal with nesting macros. Is there any way to render something like below?

{% spoiler site_config.yml %}

{% codeblock test lang:yml %}
{% include _config.yml %}
{% endcodeblock %}

{% endspoiler %}