Tags:

First Actual Post

Ok, so, I'm calling this a win.

I've got my new site engine up and running. I've called it GitSite for now, and it's currently located in my Git Area.

It's called GitSite because the site it generates from is a git repo. This site, for example, is here.

I still have a lot to do with this thing. I've got more data to add to the template, a couple changes to make to the theme, a couple features to add to the engine, but it's at this point workable.

At this point I'm going to talk a bit about GitSite.

GitSite, a description

So, the basic idea here was to make a site engine for publish articles (Notice how I'm avoiding the term 'blog'?) that was based off static files and git.

So, all of the pages that are being served here are static. All of the html, conversion, templating, etc was all done on the server prior to it being available. By the time it's accessible, it's a collection of files with a lot of duplication.

I like that.

Also, it's all Git, and, for now at least, public. Not for updates, but if you wanted to download the entire source of my site you'd just need to do:

git clone git://psycoti.ca/Site

Isn't that sick?

I think that's sick.

I will now go through the what one can expect to find in a GitSite source repo.

Articles

This is pretty simple.

There's a directory called 'articles'.

Each file in this directory is a single article.

The name of the file is the title of the article.

The contents of the file are the contents of the article, potentially in some kind of markup.

That's about it.

Templates

Also pretty simple. We've got a number of files with very specific titles in here.

Each one is expected to be an executable script, and the data is passed to it as alternating keys and values on the command line.

So, for example, to call the 'bork' template with content of 'blah' and title of 'dribble' it would attempt to execute

./templates/bork Content 'blah' Title 'dribble'

Pretty simple.

Currently the following templates exist: (Note: This is very likely going to change very rapidly, but this is just to give an idea)

So, that's that, for now.

Like I said, I have a couple more I'm planning to add, or break up, or make optional, as I add more functionality or make it nicer for others.

That's the basis of the templates though.

Options

There are a couple of things, that I'm going to call options, in the engine.

These are things like which markup engine to use, or how urls should be encoded.

Currently this is also done with executable scripts in the directory.

In this case they act like filters, with the thing they're supposed to act upon as stdin and the result as stdout.

Other than that, the script doesn't care how they work to come up with their answers. The markup engine could be sed, or PHP, or Markdown, or NME (Which I'm currently using), or cat (Verbatim).

Wrap Up

So, that's pretty much it.

I've got this thing now, and I like it.

Assumedly it's going to get better.

I'll probably keep you posted as I go.

Originally Published:
2010-03-26T03:47:47Z
Last Updated:
2011-12-13T03:07:16Z