<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator><link href="https://nicholdav.info//feed.xml" rel="self" type="application/atom+xml" /><link href="https://nicholdav.info//" rel="alternate" type="text/html" /><updated>2025-09-23T23:43:48-04:00</updated><id>https://nicholdav.info//feed.xml</id><title type="html">nicholdav.info</title><subtitle>Research software engineer with expertise in artificial intelligence and computational cognitive neuroscience</subtitle><author><name>David Aaron Nicholson</name><email>nicholdav@gmail.com</email></author><entry><title type="html">Make your own `academicpages` from scratch with `jekyll`</title><link href="https://nicholdav.info//how-to-use-jekyll-to-set-up-your-own-academic-website/" rel="alternate" type="text/html" title="Make your own `academicpages` from scratch with `jekyll`" /><published>2022-03-16T00:00:00-04:00</published><updated>2022-03-16T00:00:00-04:00</updated><id>https://nicholdav.info//how-to-use-jekyll-to-set-up-your-own-academic-website</id><content type="html" xml:base="https://nicholdav.info//how-to-use-jekyll-to-set-up-your-own-academic-website/"><![CDATA[<p>In this post I document the process I went through
to set up a peronsal web site with a structure
similar to the <a href="https://academicpages.github.io/"><code class="language-plaintext highlighter-rouge">academicpages</code></a> theme
used by many academics.
I’m writing the post for my future self,
and for you if you want to do the same.</p>

<h2 id="why-would-you-bother">Why would you bother?</h2>

<p>I wanted a site similar in style to <a href="https://academicpages.github.io/"><code class="language-plaintext highlighter-rouge">academicpages</code></a>,
with links in the sidebar to Google Scholar, OrcID, etc.,
and the ability to use <code class="language-plaintext highlighter-rouge">jekyll</code>’s “collections” feature
to easily organize publications, talks and teaching.
But I also wanted the flexibility to change themes,
which is not easy to do with <code class="language-plaintext highlighter-rouge">academicpages</code>.
I love to support Python libraries like <code class="language-plaintext highlighter-rouge">pelican</code>,
and some of the themes are very versatile,
like their version of
<a href="https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3"><code class="language-plaintext highlighter-rouge">bootstrap</code></a>.
But somehow <code class="language-plaintext highlighter-rouge">minimal-mistakes</code> and other <code class="language-plaintext highlighter-rouge">jekyll</code> themes just look better
to my (untrained) eye.</p>

<p>Last but not least, this is a fun exercise
in using libraries in a language besides Python.
It’s interesting to experience the tooling in the ecosystems
of other programming languages.</p>

<h2 id="how-did-we-get-here">How did we get here?</h2>

<p>I’ve had a personal web page for sometime that I set up with
<code class="language-plaintext highlighter-rouge">pelican</code>, a static web page generator in Python.
Basically I adopted my approach from the one Jake Vanderplas took for his
<a href="https://github.com/jakevdp/jakevdp.github.io-source/">“pythonic perambulations” blog</a>.
However I wasn’t happy with how my page looked
(which has nothing to do with Jake Vanderplas,
and everything to do with my moribund graphic design and css/html skillz).
And it was time to update my site anyway.
Recently I noticed a collaborator had set up their own personal site using the
excellent <a href="https://academicpages.github.io/"><code class="language-plaintext highlighter-rouge">academicpages</code></a> repository,
developed by <a href="https://stuartgeiger.com/">Stuart Geiger</a>.
<code class="language-plaintext highlighter-rouge">academicpages</code> is great if you are trying to survive in academia
and you don’t have time to bother learning how to use a static site generator.
With <code class="language-plaintext highlighter-rouge">academicpages</code> you just want to follow a couple steps to add your own
content to some existing template, to easily get a site.</p>

<p>Some background:
<code class="language-plaintext highlighter-rouge">academicpages</code> is a fork of <a href="https://mmistakes.github.io/minimal-mistakes/"><code class="language-plaintext highlighter-rouge">minimal-mistakes</code></a>,
a very popular theme for the <code class="language-plaintext highlighter-rouge">jekyll</code> library.
<code class="language-plaintext highlighter-rouge">jekyyl</code> is a static site generator written in
the <code class="language-plaintext highlighter-rouge">ruby</code> programming language.
You can think of it as analogous to <code class="language-plaintext highlighter-rouge">pelican</code> in Python
(or Ruby developers might tell me that <code class="language-plaintext highlighter-rouge">pelican</code> is analgous to <code class="language-plaintext highlighter-rouge">jekyll</code>).
One advantage of using <code class="language-plaintext highlighter-rouge">jekyll</code> is that
GitHub really likes <code class="language-plaintext highlighter-rouge">jekyll</code>,
letting developers easily create web pages for themselves or documentation
for their projects through the
<a href="https://docs.github.com/en/free-pro-team@latest/github/working-with-github-pages/about-github-pages-and-jekyll">GitHub Pages service</a>.
And it’s free, another plus for academics.
Stuart modified the <code class="language-plaintext highlighter-rouge">minimal-mistakes</code> theme in such a way
that other academics could simply fork its repo
on GitHub and use the web interface to add their own content,
without needing to know how to use <code class="language-plaintext highlighter-rouge">jekyll</code>
or how to use any developer tools like <code class="language-plaintext highlighter-rouge">git</code>.</p>

<p>So I knew I wanted a site like <code class="language-plaintext highlighter-rouge">academicpages</code>,
but I also knew there were things I wanted to modify, such as the theme / template.
There’s little documentation in the <code class="language-plaintext highlighter-rouge">academicpages</code> guide about
<em>what</em> changes were made to the <code class="language-plaintext highlighter-rouge">minimal-mistakes</code> theme, and why.
How did Stuart evolve the template from your standard <code class="language-plaintext highlighter-rouge">jekyll</code>
minimal blog page to a very specific set-up for academics?
Unique features of <code class="language-plaintext highlighter-rouge">academicpages</code> include
that it lands on the <code class="language-plaintext highlighter-rouge">about</code> page and shows a profile in the sidebar
with links to academia specific sites, and
includes tabs like “publications”, “talks”, etc.?
I tried looking at the <code class="language-plaintext highlighter-rouge">git</code> commit history but couldn’t
piece it together.
I figured there couldn’t be <em>too too</em> many steps
to setting up a similar site on my own.</p>

<h2 id="step-by-step-guide-to-developing-your-own-academicpages">Step-by-step guide to developing your own ‘academicpages’</h2>
<p>Here’s the summary version first so you know what you’re getting into:</p>
<ol>
  <li>set up a <code class="language-plaintext highlighter-rouge">jekyll</code> development environment</li>
  <li>make the landing page be your about page</li>
  <li>make the sidebar show your profile with links</li>
  <li>add links to publications, talks, etc., in the nav bar at the top of the page</li>
</ol>

<h3 id="setting-up-a-development-environment">Setting up a development environment</h3>
<p>This is a thing that might be new to academics
not familiar with software engineering,
but the <code class="language-plaintext highlighter-rouge">jekyll</code> and <code class="language-plaintext highlighter-rouge">ruby</code> devs have worked really hard
to make it easy.</p>

<ul>
  <li>set up a basic environment for working with <code class="language-plaintext highlighter-rouge">jekyll</code>
    <ul>
      <li>their quickstart is here: <a href="https://jekyllrb.com/docs/">https://jekyllrb.com/docs/</a></li>
      <li>I’m on PopOS, a Linux distribution similar to Ubuntu, and I use oh-my-zsh,
so I followed these instructions: <a href="https://jekyllrb.com/docs/installation/ubuntu/">https://jekyllrb.com/docs/installation/ubuntu/</a>
except I changed <code class="language-plaintext highlighter-rouge">.bashrc</code> to <code class="language-plaintext highlighter-rouge">.zshrc</code></li>
    </ul>
  </li>
  <li>then I followed the directions for managing dependencies with <code class="language-plaintext highlighter-rouge">bundler</code>
so that I could install the <code class="language-plaintext highlighter-rouge">minimal-mistakes</code> template as a <code class="language-plaintext highlighter-rouge">gem</code>
instead of forking their repo and modifying it
    <ul>
      <li><a href="https://jekyllrb.com/tutorials/using-jekyll-with-bundler">https://jekyllrb.com/tutorials/using-jekyll-with-bundler</a></li>
    </ul>
  </li>
</ul>

<h3 id="making-the-landing-page-be-your-about-page">Making the “landing page” be your “about” page</h3>
<p>This is the first thing that’s specific to our site design.</p>

<ul>
  <li>use the <code class="language-plaintext highlighter-rouge">redirect</code> plugin so that the site lands on “about”</li>
  <li>add an <code class="language-plaintext highlighter-rouge">about.md</code> –
make sure you copy the <a href="https://jekyllrb.com/docs/front-matter/">YAML front matter</a>
from <code class="language-plaintext highlighter-rouge">academicpages</code></li>
  <li>make sure <code class="language-plaintext highlighter-rouge">_config.yml</code> specifies defaults for <code class="language-plaintext highlighter-rouge">pages</code> so that your
theme gets applied to this <code class="language-plaintext highlighter-rouge">about.md</code> file
    <ul>
      <li>I copied the <code class="language-plaintext highlighter-rouge">#defaults</code> section from the <code class="language-plaintext highlighter-rouge">academicpages</code> <code class="language-plaintext highlighter-rouge">_config.yml</code></li>
    </ul>
  </li>
</ul>

<h3 id="making-the-sidebar-show-your-profile-with-links">Making the sidebar show your profile, with links</h3>
<p>Now we’re cooking with <code class="language-plaintext highlighter-rouge">academicpages</code> gas! Or something</p>

<ul>
  <li>to make the author profile in the sidebar render all the links that are
in <code class="language-plaintext highlighter-rouge">academicpages</code> but not in <code class="language-plaintext highlighter-rouge">minimal-mistakes</code>, i.e. academia specific
things like a Google Scholar page, ORCID profile, etc., you’ll need to add
an <code class="language-plaintext highlighter-rouge">author-profile.html</code> in an <code class="language-plaintext highlighter-rouge">_includes</code> directory.
Basically I copied the <code class="language-plaintext highlighter-rouge">author-profile.html</code> from <code class="language-plaintext highlighter-rouge">minimal-mistakes</code> and
then added the relevant if-then statements in the <code class="language-plaintext highlighter-rouge">author-links</code> section.</li>
  <li>for things like an author pic, I added them in <code class="language-plaintext highlighter-rouge">assets/images/</code> – I think
this is consider “idiomatic Jekyll” even though the <code class="language-plaintext highlighter-rouge">academicpages</code> repo
just has an <code class="language-plaintext highlighter-rouge">images</code> folder in its root. Doesn’t matter too much as long
as you specify the correct relative path in your <code class="language-plaintext highlighter-rouge">_config.yml</code></li>
</ul>

<h3 id="adding-links-to-publications-talks-etc-in-the-masthead-nav-bar">Adding links to publications, talks, etc., in the masthead nav bar</h3>
<p>Unique to <code class="language-plaintext highlighter-rouge">academicpages</code> are the links in the navigation bar
at the top of the page to pages with lists of publications, talks,
and so on.</p>

<p>If you want the same thing, there’s two things you’ll need to do:</p>
<ol>
  <li>you’ll need to copy the ‘navigation.yml’ file from <code class="language-plaintext highlighter-rouge">academicpages</code>,
placing it in a <code class="language-plaintext highlighter-rouge">data/</code> subfolder in your project root,
and modify it as you see fit.</li>
  <li>add two related sections in your <code class="language-plaintext highlighter-rouge">_config.yml</code>:
    <ul>
      <li>a ‘collections’ section,
 like <a href="https://github.com/academicpages/academicpages.github.io/blob/25c30de2b4ce3e3f23559384699bb4b9865d6473/_config.yml#L176">this one</a>
 in the <code class="language-plaintext highlighter-rouge">academicpages</code> <code class="language-plaintext highlighter-rouge">_config.yml</code>.</li>
      <li>and corresponding keys in your <code class="language-plaintext highlighter-rouge">defaults</code> section
 as shown <a href="https://github.com/academicpages/academicpages.github.io/blob/25c30de2b4ce3e3f23559384699bb4b9865d6473/_config.yml#L212">here</a>
 in the <code class="language-plaintext highlighter-rouge">academicpages</code> <code class="language-plaintext highlighter-rouge">_config.yml</code>.</li>
    </ul>
  </li>
</ol>

<p>This <em>is</em> explained very briefly in the <code class="language-plaintext highlighter-rouge">about.md</code> of <code class="language-plaintext highlighter-rouge">academicpages</code> but
here’s a quick explainer of how it all works.
<code class="language-plaintext highlighter-rouge">minimal-mistakes</code> lets you add links to the masthead
by supplying a file called <code class="language-plaintext highlighter-rouge">navigation.yml</code>.
This is a
<a href="https://jekyllrb.com/tutorials/navigation/">standard approach in <code class="language-plaintext highlighter-rouge">jekyll</code></a>.
There are other uses for <a href="https://jekyllrb.com/docs/datafiles/">data files</a>.
What’s specific to <code class="language-plaintext highlighter-rouge">minimal-mistakes</code> is that you
add these links to the nav bar by specifying a <code class="language-plaintext highlighter-rouge">main</code> key
in <code class="language-plaintext highlighter-rouge">navigation.yml</code>, as described here:
<a href="https://mmistakes.github.io/minimal-mistakes/docs/navigation/">https://mmistakes.github.io/minimal-mistakes/docs/navigation/</a>.
In the case of <code class="language-plaintext highlighter-rouge">academicpages</code>,
the links have the names of the specific sections
in the <code class="language-plaintext highlighter-rouge">navigation.yml</code> with the keys “publications”, “talks”, etc.</p>

<h2 id="coda-publishing-etc">Coda: publishing, etc.</h2>

<p>After making the changes just described, I had a site
with a structure similar to <code class="language-plaintext highlighter-rouge">academicpages</code>.</p>

<p>To actually publish the site, I still use a workflow similar to
what Jake Vanderplas uses for his blog:
<a href="https://github.com/jakevdp/jakevdp.github.io-source">https://github.com/jakevdp/jakevdp.github.io-source</a>
This centers around a Makefile with commands for <code class="language-plaintext highlighter-rouge">build</code> and <code class="language-plaintext highlighter-rouge">serve</code>.</p>

<p>The key thing that makes it easy to publish to Github Pages is to
use the <code class="language-plaintext highlighter-rouge">ghp-import</code> package, as suggested by the <code class="language-plaintext highlighter-rouge">pelican</code> docs:
<a href="https://docs.getpelican.com/en/latest/tips.html#project-pages">https://docs.getpelican.com/en/latest/tips.html#project-pages</a>.
Of course, <code class="language-plaintext highlighter-rouge">jekyll</code> gets special treatment on GitHub
so it’s kind of overkill,
but I still like having a separate repo that I just push the
.html and .css files to without thinking about it.</p>

<p>So this is how I have my site set up now!
Stay tuned for it to change suddenly,
because as a developer I love to spend hours
farting around with tools that let me avoid real work.
I’ll keep this post up for posterity anyway.</p>]]></content><author><name>David Aaron Nicholson</name><email>nicholdav@gmail.com</email></author><summary type="html"><![CDATA[In this post I document the process I went through to set up a peronsal web site with a structure similar to the academicpages theme used by many academics. I’m writing the post for my future self, and for you if you want to do the same.]]></summary></entry></feed>