Custom Javascript In Jekyll Blogs
Not that this graph has anything meaningful, but it was easy to create using visjs.org. Follow along and I’ll show you have to create this on you Jekyll Blogs. You can also view a good tutorial by Emma Tosch.
Step to Add Javascript on Github Pages
Create a subdirectory
Create the following
_includes/graphs/dag_default.js
,
but don’t include any script
tags.
Edit _includes/head.html
You can view the full file _includes/head.html but below are my changes.
Modify _layout/post.html
Note this needs to go near the bottom of the _layout/post.html
Creating Pages
Here’s a sample header on my markdown page
Reference
If you get stuck, checkout the source repository