Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A bridge between Git and MT-Rebuild to publish recently committed or modified Movable Type templates
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.



MT-GitPub is a bridge between Git and Tim Appnel's mt-rebuild, a command line template rebuilder for Movable Type. MT-GitPub will find which templates you have just committed (or modified) and invoke mt-rebuild to just rebuild those templates. Good for iterative testing, or deploying changes to your live site.


Note, this is unstable pre-alpha software. Use at your own risk.

Download and install mt-rebuild if you haven't already. Download mt-gitpub and chmod 700 Make sure all the templates you'd like to be able to publish are linked to a file in the MT application.

Setup a config file by running MT-GitPub in setup mode: bash -s [configfilename]. If this is your first configfile, use as your filename, as that is the default MT-GitPub will look for when publishing templates. Answer the questions-- the setup script will query your MT database to find all of your linked index templates for a given blog_id.

If you'd like to fill in your config file manually, rename to and fill in paths to mt-rebuild, your Git repo and your blog id. Make a list of your templates according to the example (leave these lines commented to avoid runtime errors).

I recommend setting up multiple config files (either manually or with -s for each blog you work on and calling them with -c.


To run in default mode, run bash

By default, MT-GitPub will look for in the same directory and publish last-committed index templates. However, there are options:

Use an alternate config file -c [configfilename]

Publish last modified files rather than last committed -m

Set up a new config file -s [configfilename]. It will generate the config file in the same directory, which you can call later with -c. This option will not do any publishing.

Right now, MT-GitPub only supports index templates.

To Do

  • Default -s to rather than making you manually type in desired filename

  • add support for archive templates

  • options -- only archives/only indexes

  • get into git post-commit hooks


  • Template lists in interpreted as commands if left uncommented

  • Errors on template modules (no output file)


Copyright 2009 Al Shaw

GPL v3

Something went wrong with that request. Please try again.