Trying to follow several resources [1, 2] for setting up the code snippet copy capability in Jekyll site, but for some reason, I could not get it working. I suppose this may be something to do with theme I am using (the
beautiful-jekyll theme), and I am not what to tune to make it working with the code snippet copy function posted by others (see Ref. [1, 2]). Instead of struggling with those minor tunes, I am using a separate routine for such a purpose, without any involvement with CSS styling, etc.
MORE LINKS \(\rightarrow\)
BLOG REPO to visit the GitHub repo for current blog), in the header part of each post, it is specified the
post. We then can find
post.html in the
_layouts directory which includes the definition for the outlook of a post. There, in the header part, one can find it is further pointing to the
base layout which then refers to the
base.html file under
_layouts. Opening the
base.html file, we can find that it includes the
head.html file (which fundamentally defines the
<header> section in the rendered HTML file). The
head.html file can be found under
<header> section of the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Here is where I put those lines in the
head.html file, Click Me.
Then, as what I have above in current blog, we need to put down a button to link to the
1 2 3
Finally, to link the
N. B. The ID for the pasted code from hilite.me should go to EXACTLY the
<td>section as presented in the link here.
N. B. Those pasted HTML from hilite.me was changed a bit across all posts in my blog to remove the padding space of the code block - specifically it is this bit
padding:.0em .0em;in here.