Building a Better Blog

Ok, "better" is subjective. Is this website better than no website? Maybe. Is it overly convoluted? Almost certainly.

Here is the setup I've created for web development:

Environment

I have a couple of computers I wanted to use for creating content for this blog, both running Windows. I also have a network attached storage (NAS) device on my local network. None of these had a development environment already, so I decided to create a clean one from scratch.

Basically what I wanted was:

  • Ability to write content on my notebook or tablet.
  • History of the changes I'd made to the content.
  • A separate test environment I could view the website in before deploying, accessible from both Windows computers.
  • A website of static files that will load quickly on any device/internet connection.

Process

  1. Content is written using reStructuredText. This is a plaintext markup syntax that makes the source easy to read.
    • My text editor of choice is Vim, which includes highlighting for RST.
  2. Once the content is written, it's checked into a Mercurial repository (using TortoiseHG on my Windows systems). This means that a history of changes is preserved.
  3. The changes are pushed to a master repository stored in my personal ownCloud instance. This ensures I always have access to the most recent version of an article on all of my devices.
  4. Testing is done in a VirtualBox system accessible from either of my Windows computers (it's hosted on my NAS).
    • The virtual machine is running my preferred distribution: Debian Linux.
    • There's no GUI installed, and it is managed via SSH.
    • ownCloud is accessed as a WebDAV share using davfs2.
  5. The most recent changes are pulled from the Mercurial repo into a project directory.
  6. Pelican builds static HTML files, as well as the other resources needed, from the reStructuredText. Once the changes are tested and confirmed working they can be published.
  7. The static files are transferred to my web host (Media Temple) via rsync+SSH.

Design

Currently, the default theme from Pelican is used for layout. That needs to change very soon.

Conclusion

This process is pretty complicated, so maybe I need to streamline it a bit. I definitely want to do a more in-depth explanation of the individual components at some point in the future.

Links

Social Media