`include` and `copy` attributes for code fences

Two attributes I found missing when writing markdown:

  • ```include=<filename>
    • Allows including a local file as the content of this codeblock, useful for large files
  • ```copy
    • Adds a data-copy attribute to the code-block, useful if you want to add copy buttons only to some blocks.

Would these feature make sense in Zola ? I already have a PR ready if so :smile:

5 Likes

Would love this :smiley:

I just posted a draft PR, I still need to update relevant documentation :+1:

2 Likes

Just to clarify, Iā€™m not a maintainer of zola, just a user and very occasional contributor.

Yes haha, I was just waiting to see if enough people were interested before posting the draft :smile:

oooh i would also love this! would you happen to have implemented copy buttons too?