Not a developer? Go to MovableType.com

Documentation

An Overview of Movable Type’s Publishing Engine

One of Movable Type’s most powerful features is its publishing engine, which allows you to control everything the system publishes through a minimal set of configuration rules and templates.

Configuration rules dictate the types of content published by the system as well as their locations and the rendering mode used to generate them (i.e. static or dynamic). Templates allow you to define the content, layout and structure for particular pages in your site or entire classes of pages.

Once configured to suit your needs, Movable Type handles the rest, seamlessly creating and updating your blog’s content without the burden typically associated with updating a website.

Flexible, Customizable Output

While Movable Type is specifically well suited and configured out of the box for publishing blogs and related content, the system’s flexible template system doesn’t limit you in any way and enables you to publish practically anything regardless of design, content or file format. This includes but is certainly not limited to:

  • HTML
  • XML / RSS / Atom
  • Plain text
  • PDF
  • WordXML
  • Podcats / Videocasts
  • PHP/ASP/JSP code
  • Structured Query Language (SQL)

Blog Indexes and Archives

Blogs are well known for their fast-flowing, reverse-chronological listing of recent entries as well as RSS and Atom feeds of that same content which is delivered to interested readers automatically through their feed readers. The files that are published by Movable Type which control these are called indexes.

Indexes change constantly and the presence of a single piece of content on them usually lasts a few weeks at most. These types of pages exist almost solely for keeping visitors apprised of what’s new.

However, in addition to these quickly changing indexes, Movable Type publishes a set of pages upon which the content lives permanently. These files in aggregate are called the blog’s archives.

Archive Types

Movable Type currently supports seven archive types: Daily, Weekly, Monthly, Category, Author, Entry and Page.

A number of files are produced and updated automatically by the system for each archive type that is enabled. Together the category-, author- and date-based archives serve as historical repositories of entries grouped by topic or period of time in which they were posted. Note that author-based archives are new in Movable Type 4.

The Entry and Page archives, on the other hand, are literally just a smaller grouping: one published file per Entry or per Page, respectively. By default this archive file also contains all feedback functionality and previously posted fedback for the entry or page.

The Default Published Blog

When a new weblog is created in Movable Type, it is immediately ready for use and requires no further configuration. By default, the system publishes the following for each weblog:

  • A main index (the home page of the blog)
  • A master archive index
  • RSS and Atom feeds
  • Monthly archives
  • Category archives
  • Author archives
  • Individual entries
  • Individual pages

In addition several auxiliary files (e.g. cascading style sheets, a site JavaScript file, etc.) are created which provide both style and functionality to the published weblog.

Static and Dynamic Publishing Modes

Movable Type supports two modes of page rendering: static and dynamic publishing. The difference between the two modes is mainly the timing of page compilation. Which you choose depends solely on your blog’s particular traffic patterns and size.

Static Publishing: Scaling for High-Volume Sites

Under static publishing, files are updated on the file system (or created when necessary) immediately upon any change in their content. By default, the system is configured to render all pages statically because this mode is universally compatible with all systems.

The static page publishing model provides a number of important advantages. Static pages are significantly more scalable and less resource intensive, once created. This model offers a great deal of flexibility when working with standard webserver-based dynamic page generation technologies (e.g. PHP or server-side includes) and also allow you to easily publish content to multiple or remote locations with standard synchronization tools.

Dynamic Publishing: Immediacy for Blog Users

The dynamic publishing model, which is implemented on top of PHP and the Smarty Template Engine, provides the advantage of immediacy to Movable Type users (as opposed to blog readers). Under dynamic publishing, template and content changes are simply stored in the database and then, when an incoming request for the virtual page is received by the webserver, they are merged on-the-fly and delivered. These compiled requests are additionally cached in the file system to lower the cost of handling subsequent requests.

Under dynamic publishing, rebuild times are shorter and template changes are immediately reflected in the layout since pages are generated when requested. Disk space requirements are reduced since content pages are generated in memory rather than stored on the file system. The system can be configured to publish all of your archives dynamically or, if you prefer, on a template-by-template basis. The ability to employ a custom combination of publishing modes allows you to optimize weblog response performance and server loads.

With the flexibility to choose your publishing model, you can maintain the best balance of fast rebuilds and low server load to suit your needs. Which is best and most efficient depends on your individual situation.

Publishing: Static File Creation

Movable Type handles publishing static files automatically for most actions in which an item (e.g. entry, comment, TrackBack, etc.) is created, deleted or edited. However, there are some actions for the task of publishing is left up to you. Typically, these are procedures that might require multiple steps like the configuration of a weblog or editing of a set of templates. In these cases, it would be wasteful of both time and server resources to publish the weblog upon pressing each Save button.

Publishing your blog dynamically

Although pages which are dynamically published do not require rebuilding, weblogs which employ dynamic publishing still do because they must publish two static trigger files and update their internal cache of virtual URLs.

Therefore dynamic weblogs require a full rebuild on the following occasions:

  • When a weblog is first created/published
  • For the dynamic publishing subsystem to work, the system must statically publish two files
  • .htaccess and mtview.php. Hence rebuilding is necessary to publishing these files
  • When the publishing settings for a weblog change, the system must recalibrate itself to respond correctly, whether that is to a new URL structure or to a different dynamic/static template mix. During a rebuild, the system’s FileInfo table is rebuilt which maps virtual URLs to Movable Type content.

You are always be prompted to perform a rebuild by the system when needed and a full dynamic rebuild takes on a small fraction of the time that a full static rebuild does.

Note: mtview.php is published by one of the weblog’s templates named Dynamic Site Bootstrap template. This file must be statically published, otherwise, the dynamic publishing system will not be triggered by incoming requests.

Back