Welcome to my Open Notebook

This is an Open Notebook with Selected Content - Delayed. All content is licenced with CC-BY. Find out more Here.

ONS-SCD.png

Personal academic website with jekyll

Having a personal academic website is great for developing and coordinating information that you can publish about your work and others can find out about you.

There are a range of options from very simple approaches like the postcards package in R https://github.com/seankross/postcards or the more complicated approach using the https://github.com/alshedivat/al-folio.

My own blog and some other websites I created (e.g. My Online CV) are based on some markdown templates I borrowed from other authors on github, and they all use the Jekyll static site generator framework. I have found that using jekyll on my Ubuntu linux computers is fairly straightforward but I am keen to also be able to develop sites on windoze computers. Therefore I am going to embark on an experiment to set up a jekyll site generator using windows sub linux (WSL) as I think that running linux alongside windows applications gives a lot of access to powerful tools and a range of software from both windoze-land and linux-land. I will use this post to document the steps I take.

Steps:

1. Install WSL

Open powershell as Admin, ran

wsl --install

but this just showed the wsl help text, so I found instructions that let me know if wsl is already installed, but no linux system distribution has been enabled this happens, so in my case I had to run wsl --list --online and choose a distro. I chose Ubuntu which I assume will default to the latest version

2. install dependencies

sudo apt update
sudo apt upgrade
sudo apt install make build-essential curl git tree -y

3. install ruby

sudo apt install ruby ruby-dev -y

4. need to tell Ruby’s gem package manager to place gems in our user’s home folder.

nano ~/.bashrc
export GEM_HOME=$HOME/gems
export PATH=$HOME/gems/bin:$PATH

Save and close the file, then activate the environment variable with the following command:

source ~/.bashrc

Install Jekyll

gem install jekyll bundler

5. Try it out

jekyll new jekyll.example.com
cd jekyll.example.com
bundle add webrick
jekyll serve

6. References:

https://learn.microsoft.com/en-us/windows/wsl/install

https://www.howtoforge.com/how-to-install-jekyll-on-ubuntu-22-04/

https://jekyllrb.com/docs/installation/windows/

additional stuff

1. Pandoc: for converting between document file types, especially markdown to html

sudo apt install pandoc

Some cool examples are here: https://zatta.link/en/web/top3-tools-for-convert-markdown-to-html.html

Posted in  writing


blog comments powered by Disqus