Display Random Jekyll Posts During Each Page Load or Refresh Using Javascript

Published January 19, 2014 • Updated January 10, 2019


Because Jekyll is a static site generator it can be difficult to have various parts of your website be dynamic. For example, I wanted a side bar element to show a list of randomized posts. I found two methods here and here to go to a random Jekyll post by clicking a link, but nothing that displayed a randomized list of Jekyll posts. So, I adapted the Javascript code from the links into what I was looking for.

Continue reading...