jekyll-clipboardjs

This code help to use clipboardsjs in code snippets generated from Jekyll, adding a button to copy code.

Usage

Add copy.js, clipboard.js and style.css into assets folder.

In Jekyll layouts files include modifications highlight style (I just add style for button created):

<link rel="stylesheet" href="/assets/style.css">

In the same files include clipboard.js and copy.js:

<script src="/assets/clipboard.min.js"></script>
<script src="/assets/copy.js"></script>

Example

This example.html show the usage.

jekyll logo

Want a Jekyll website built?

Hire a Jekyll developer