Adding about pages to stagit
I use stagit to show the public repositories of my Git server on the web. I chose stagit because it is a very simple and lightweight tool, which makes tinkering with the source code very straightforward (which I have been doing a bit lately) and because the resulting website is static: easy to set up, faster, and there aren't any application-specific issues (there is no application). Static sites are also nice because you know exactly what is going on when a page is requested—the file is served—, whereas if it is a dynamic site, you might or might not know what operations the server is doing to answer the request.
Stagit doesn't have many features. This isn't necessarily bad, as it keeps the source small and readable and it still does everything I consider necessary, it even has an Atom feed for commits! The one feature I really missed was being able to show an about page with the repository's readme file when it is opened1. For me, it is a basic feature, especially with repositories for projects without a website/wiki. When I hear about a piece of software, the first I do is go check out the repository and read a bit about it, and readme files make that easier. Since most of my repositories have readmes written in Markdown, I wanted stagit to convert them to HTML, so they could be shown nicely on the repositories' website.
If you want to try it out yourself, the change on stagit is very simple, just a couple of lines, but it will add a dependency to the program2. I use md4c to parse the files, and it is ridiculously fast. I haven't noticed any changes in the time it takes for stagit to run. Check out this commit if you want to know how I did it, and feel free to suggest other approaches if you think they are better.
-
Stagit has a link on the navigation bar to the readme file, and you could easily make that the
default
index.html
file, but it is just the page with the raw file (as any other file is shown), it isn't presented like an about page. ↩ - The dependency is only for parsing Markdown, if you don't need that, you can just show the raw file without the line numbers and metadata, this is what I do when the readme file isn't a Markdown file. ↩