As of now, this post will serve some small notes/details as to how this site runs.
I plan on an in-depth post as to how this site functions.

The Setup

This site is currently running on a DigitalOcean droplet running Ubuntu 20.04. I read great reviews about Digital Ocean’s VMs reliability and costs. They also gift a $100 voucher for students that are signed up for GitHub’s Student Developer Pack, so it was hard to pass up.

I had some help from this post. I had the server already setup, but needed some steps to configure the Jekyll server and pushing from my local device.

It walked me through the post-receive script within Git. Every time a push occurs, the script clones the repo to a temp folder which then builds to my public website directory.

post-receive:

#!/bin/bash -l
GIT_REPO=$HOME/repos/portfolio.git
TMP_GIT_CLONE=$HOME/tmp/git/portfolio
PUBLIC_WWW=/var/www/portfolio

git clone $GIT_REPO $TMP_GIT_CLONE
jekyll build --source $TMP_GIT_CLONE --destination $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit

I ran into an issue when pushing to the remote server. Since this is my first go at Ruby, I didn’t know the Gemfile.lock was significant to the system it was created on. Therefore, Ruby did not recreate one when I initally pushed the proejct to the remote server.

Adding Sidenotes

I wanted to add some sidenotes to my posts after seeing Gwern.net’s footnotes and sidenotes in his posts. Checkout his page to see a great portfolio.

I could not find a reliable view of implementing sidenotes in Jekyll.. until I came across Tufte-Jekyll, a theme that implements Edward Tufte’s “distinctive style” in his writings.

I impletmented Tufte-Jekyll’s sidenote.rb to create my sidenotes. example sidenote They still need some work since I had to recreate them into the minimia theme that is running on this site.

Here is the sidenote.rb:

module Jekyll
    class RenderSideNoteTag < Liquid::Tag
  
      require "shellwords"
  
      def initialize(tag_name, text, tokens)
        super
        @text = text.shellsplit
      end
  
      def render(context)
        "<label for='#{@text[0]}' class='margin-toggle sidenote-number'></label><span class='sidenote'>#{@text[1]} </span>"
      end
    end
  end
  
  Liquid::Template.register_tag('sidenote', Jekyll::RenderSideNoteTag)

The css for the sidenotes still needs to be reworked.