Integrating Gitweb output into a WordPress page

One of my known stumbling blocks to converting my site to WordPress was how was I going to manage to incorporate gitweb so that its output appears within the middle of a page, formatted to at least look like a normal page. The problem occurs because gitweb takes over managing the output and writes an html page complete with headers and footer. You are allowed to provide your own site_header.html and site_footer.html files, but these are inserted just after the opening tag and just before the closing tag. There is no way you can add to the header.

One approach to this, and the one I took on my previous version of this site, was to embed gitweb within an <iframe>. Effectively gitweb’s output is sandboxed within the <iframe> context. Unfortunately, despite some javascript trying to detect it, when the quantity of output changed the size of the iframe needed to change and it didn’t seem to do that automatically. I often found the output was chopped off (with a scroll bar provided) even when my full page was nowhere near full screen.

I have taken a different approach this time. In outline I have created a holding page with permalink “/software/” to hold the repository code and then created a special template for my site theme which when called embeds output from gitweb into the page. There are a few tweaks to the header is moved to the correct place and that links within the output are correct.  Down to the detail.

Continue reading “Integrating Gitweb output into a WordPress page”

Source Code for recent applications now online

I have just finished putting the my git repositories on-line so that anyone wishing to access the code can do so.

gitweb provides a web interface to show the changes to the code etc, whilst the actual code can be retrieved using git. Use

git clone git://www.chandlerfamily.org.uk/project.git ,

where project.git is one of the projects listed from the web interface.

I have just finished putting the my git repositories on-line so that anyone wishing to access the code can do so.

gitweb provides a web interface to show the changes to the code etc, whilst the actual code can be retrieved using git. Use

git clone git://www.chandlerfamily.org.uk/project.git ,

where project.git is one of the projects listed from the web interface.