date: 2014-06-28 11:30:00-07:00

This is my website. There are many like it, but this one is mine.

This page is in Construction. Please check back later for updates.

What is the purpose of this site? Honestly, I don’t really know for sure. It’s a place where I can publicly vent about life. It’s a place where I can post reference pages for my own convenience as much as for others. It is an excuse to practice some javascript, HTML, python, and other such technologies. It is a venue to showcase my various projects and a place for me to post my photos.

As an engineer, I am stereotypically out of practice in the use of real english for the purpose of portraying an idea; this site is a venue for me to practice my writing skills.

For a deeper history of this site, or an in depth showcase of the site’s design, continue reading below.

  1. Back Story

  2. Basic Design

  3. Pelican Configuration

  4. Automation

  5. Fretstrap

  6. Additional Third Party Software

  7. Current Repository Status and Future Plans

Back Story

I’ve had this domain - curtissand.com - now for almost a decade. Throughout this whole time period I’ve been searching for a website design to call my own. I’ve put the site through many many different changes and incarnations in what seemed, until now, a fruitless search. Nothing I have tried in the past has really fit into what I’ve been looking for in my own personal website. Part of the difficulty has been that I didn’t really know what I wanted in a website, didn’t know what I was looking for.

It was easy to reject solutions that I definitely didn’t want. Wordpress, No Thank You! Drupal, better but still not what I want. Then I started wading through lists of free and open source static website generators, PHP scripted pages, and so on. It can become quite the rabbit hole if you let it.

There was even a time or two when I thought to myself that I could script the thing together using Twitter Bootstrap and python libraries such as jinja2, docutils and such. And I could. Except that I can’t. Or, perhaps more importantly, I don’t really want to. In a perfect world I’d go and build something concise and simple and flexible and useable, and it would be easy for me to maintain and it would just do what I needed without a fuss. However, the reality is that first it takes quite a bit of work to get the basic infrastructure in place, and then things like maintaining link fidelity across a bunch of pages start to gum up the works. So this becomes a lot of mind numbing work before it can turn into the nice happy unicorn that is my ideal website framework.

Basic Design

The design that I’ve settled on starts with the python project Pelican. It is a simple, python based program that supports reStructuredText and creates a static website. It uses a fairly common python toolchain setup of docutils, jinja2, pygments and a few other goodies to produce a static website from the source content. There are lots of other site generators that use similar methods but after looking at a number of them Pelican so far seems to be well maintained, well documented, very simple to use and modify and, most importantly, seems to fit well with my requirements.

For years I’ve had a handful of git repositories for personal use. One contains my programming projects and other code that I write or have modified and find useful. Another one is entirely notes that I’ve written in reStructuredText (a.k.a. RST) format. I also have a repository containing all of my configuration files and scripts. To me it seemed like an obvious choice to try and use some of this material as content on my site.

So to start things off I created a vanilla Pelican project inside a new git repository. I spent some time configuring the various options and configuring the makefile that the pelican-quickstart conveniently wrote out. Then to add in content I added a few of my git repos containing material as git submodules to the Pelican project repository and started pulling in content files from there. See the Automation section of the page for how I am pulling the content in.

Eventually I switched from the default notmyidea theme to the bootstrap theme found in the Pelican Themes repository. Quickly, I decided to fork the bootstrap theme so that I could legitimately modify it however I please. I’m calling this fork fretstrap. From the default bootstrap theme I started making various tweaks. For instance the sidebar on the left is significantly changed from the default theme. I’ve added some javascript plugins like the tag cloud and Magnific Popup plugins. Here are a few snapshots of what things used to look like…

So that’s the short story of the current site design. For more details on the the site, continue reading below.


Warning

Beyond this point some nerdy-ness may be required.

Pelican Configuration

The Pelican config is just a python file that defines a bunch of variables used by the Pelican framework when it runs. As a convenience the quickstart script creates three python config files in your default project. The main file contains the bulk of the configuration details. The other two files are used at different times and import the main config into themselves. The first is called devconf.py the other is publishconf.py, and as you may guess one is for doing in-development test builds and the other is for publishing to a public webserver. Really the only difference is that dev builds use relative URLs and don’t create any RSS feed files whereas the publish config uses absolute URLs and does create the RSS feed.

The bulk of the config isn’t very special but I have added some non-standard content and made interesting use of some options. So instead of listing and explaining everything, I’ll just call out a few bits that are neat. For documentation on all supported options please visit the Pelican site.

Note

Many of the details in the configuration can be more fully understood after reading the Automation section. For instance there are a number of files that get programmatically created by automated scripts before pelican is even called. Some of the config content shown below is to allow Pelican and the Jinja frameworks to reference these files correctly.

First thing I’ll point to is my site logs. As pointed out in the note above, these logs are actually constructed from the git log output in the three repositories that make up my site. The "blog" link below is the git log of the Pelican project repo, the "fret" link is the git log from the repo that has the bulk of my site’s content and finally the "music" link is from the repository that I have my music cheetsheets in.

SITE_LOGS = ["blog", "fret", "music"]
LOG_PATH = "pages/%s-log.html"

Also, added a string to simply show the last time that the site was updated:

LAST_UPDATED = time.strftime(DEFAULT_DATE_FORMAT)

Ensure that the "images" and "style" directories are copied as is to the webserver:

# static paths will be copied without parsing their contents
STATIC_PATHS = ['images', 'style' ]

Configure the Tag Cloud plugin:

# tag cloud
TAG_CLOUD_SAYING = "Random Tags"
TAG_CLOUD_STEPS = 10
TAG_CLOUD_MAX_ITEMS = 15
TAG_CLOUD_SIZE = 15

Enable the loop controls plugin for the Jinja2 framework. This lets you do more interesting things on collections of stuff as they get added to a page template:

JINJA_EXTENSIONS = ['jinja2.ext.loopcontrols']

Add line numbers to code fragments:

PYGMENTS_RST_OPTIONS = {'linenos': 'table'}

Automation

N/A

Makefile Modifications

N/A

Fretstrap

N/A

Additional Third Party Software

Tag Cloud

N/A

Magnific Popup

N/A

Current Repository Status and Future Plans

N/A

" "