Skip to content

use code block and include at same time #1

@sonnyhcl

Description

@sonnyhcl

Actually, I met the same question as you asked in hexojs/hexo#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 %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions