This is the repository for my personal website. The Master branch holds the source files, the gh-pages branch is used for the output files. The source files are simple markdown files that are automatically converted to HTML5 via the Python-based Pelican and then uploaded to Github with ghp-import.
The setup is pretty vanilla in that I do not use any plugins or fancy extensions, except for tagcloud.
I made some modifications to the blueidea theme, and I rolled my own shell scripts to automatically convert my bibtex bibliography into 1) a nicely formatted list of publications and 2) individual blog entries for each bibtex entry.
Those scripts are in the bib
folder, and their basic usage is explained farther down.
If you're affiliated with Stony Brook University, you can download a virtual machine image that comes with all necessary packages pre-installed.
-
Recent version of Python2.
-
Pelican 3.6 or higher. Under Linux, this might already be in your repository.
- In Debian Jessie you have to activate the backports repository to get a recent version.
- In Ubuntu 14.04 (LTS) you'll need to find a ppa or use the Mac/Windows method.
- On OSX and Windows (and Linux, if necessary) you can install Pelican via Python's package manager pip.
pip install pelican
-
The ghp-import script. Again you can install it via pip
pip install ghp-import
or use your package manager if you're on Linux.
-
Python's typogrify library. As before, use pip or your package manager.
-
A recent version of
pandoc-citeproc
(1.17 or newer) if you want to use my bibtex converter.
Once you've cloned the repository, you'll see a couple of files and folders. The most important ones are:
- content: the markdown files for the website
- output: the actual website generated by Pelican
- pelicanconf.py: contains various settings for site creation;
for your own site, you'll want to change all the variables at the top, plus
LINKS
andSOCIAL
further down. - publishconf.py: allows you to override certain settings in the final creation phase;
for your own site, change at least the value for
SITEURL
. - Makefile: set of instructions for building the website;
you might want to change the value for
GITHUB_PAGES_BRANCH
depending on your Pelican workflow
In addition, the bib folder contains a number of shell scripts (fully sh-compatible), and a subfolder with specific info on each bibtex entry.
All the shell scripts use mostly standard commands such as cat
, grep
, sed
, and awk
, and they do not use any bashisms.
The one exception is bib2mdown
, which uses pandoc-citeproc
to convert the bibtex file into a markdown file using the style sheet mylanguage.cls.
Since bib2mdown
is called in one way or another by every other script, you absolutely need to have pandoc installed.
Here's a description of each script:
-
bib2mdown
takes a bibtex file as input and returns a markdown file. The output produced by pandoc is pretty bad, so a major dose of sed magic is applied after the initial pandoc-conversion step. The following tweaks are applied:- add doi links
- rip out all other links since doi is more reliable
- add link to pdf, if it exists
- add link to detailed blog entry
- list can be bulleted, numbered, or reverse numbered
- remove remnants of Latex commands
- fix some formatting errors
-
bib2blog
produces a blog entry for a given entry in a bibtex file (with the help ofbib2mdown
). It automatically assigns it the right category (books, talks, or papers) and saves it to the corresponding subfolder (talks for talks, and papers for books and papers). It also checks whether there is a folder with the same bibkey inauxfiles
, and loads the abstract, tags, and date from the files in this folder, if it exists. It also looks for an archive with the source code indoc/talks
ordoc/papers
and adds the corresponding link. All of that is then put together into a nice entry -
create_bibliography
takes two bibtex files as input, one for publications and one for presentations. It then usesbib2mdown
to produce the Output page of the website. -
create_bibkey
runsbib2blog
for every bibtex key in a bibtex file. -
compile_references
runscreate_bibliography
andcreate_bibkey
on my bibtex files. If everything is configured correctly, this is the only script that needs to be run, all others will be called as needed.
All scripts except compile_references
take command line arguments and can be altered via various options.
Just run them with --help
to learn more.
You can also change the variables at the top of each script to adapt it to your use case.