Skip to content

basic template: Add "Copy" button to code blocks

James Westman requested to merge jwestman/gi-docgen:fix-52 into main

Add a Copy button to docblock code blocks (but not to code blocks that are part of the template, like declarations).

For now it uses the word "Copy" instead of an icon. I based the style on the one used for sidebar links, with the addition of an :active state so you get visual feedback when you click it.

Fixes #52 (closed).

Merge request reports