Six Apart Developer Wiki

The Movable Type and Professional Network Wiki has been moved to wiki.movabletype.org.

Recent Changes

The Movable Type Publishing Engine

[Login] Change #1 by OpenID IdentityByrne Reese at 2006-10-11 19:06:24.

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

Configuration rules dictate the types of pages 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 or entire classes of pages.

Once configured to suit your needs, Movable Type handles the rest, seamlessly creating and updating your blogs published pages, allowing for push-button ease of content creation without the burden typically associated with updating a web site.

Flexible, customizable output

While the application is specifically well suited and configured out of the box for publishing weblogs, the systems flexible templating system doesnt 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
  • Podcasts/Videocasts
  • PHP/ASP code
  • Structure Query Language (SQL)

Weblog Indexes and Archives

Weblogs 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 both of these pages are called indexes.

Indexes are usually quite ephemeral 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 whats new.

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

Archive types

Movable Type Enterprise currently supports five archive types: Daily, Weekly, Monthly, Category and Individual

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

The individual archives, on the other hand, are literally just a smaller grouping: one page per entry. This page also contains all feedback functionality and previously posted feedback for the entry.

The default published weblog

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

  • A main index page
  • A master archive index
  • RSS and Atom feeds
  • Monthly archive pages
  • Category archive pages
  • Individual entry archive 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 Enterprise 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 blogs 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 authors

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 drastically 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.

Rebuilding: Static page creation

In Movable Type the publishing and republishing of static pages is called Rebuilding. For convenience sake, Movable Type handles rebuilding 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 which the rebuild 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 rebuild the weblog upon pressing each Save button.

Rebuilding and Dynamic Publishing

Although pages which are dynamically published do not require rebuilding, blogs which employ dynamic publishing still do because they must publish two static trigger files and update their internal cache of virtual URLs to handle. Hence, even dynamic blogs require a full rebuild on the following occasions:

1. 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.

2. When the publishing settings for a weblog change, the system must be told to 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 systems FileInfo table is rebuilt which maps virtual URLs to Movable Type content.

The good news is that you will 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.

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

To rebuild your public facing site manually

1. 4d3180431469bd4769c055a15ba86e0c Navigate to the Main Menu for an individual blog, or any screen where your blogs left hand navigation bar appears.

2. Click the REBUILD SITE link found in the Utilities section at the bottom of the sidebar navigation menu. This will open a site rebuild dialogue box.

1. Click the arrow to reveal your rebuild options and choose Rebuild All Files.

2. With your rebuild option selected, click the button labeled Rebuild to start the process. The time to rebuild a weblog will vary depending on the content, but when finished, the entire weblog will be republished and youll see a confirmation message in the rebuild dialogue box.

3. Finally, click the button labeled Close to return to your blogs administrative screen.

[Login] Change #1 by OpenID IdentityByrne Reese at 2006-10-11 19:06:24.
Six Apart
Makers of weblog software and services for individuals, organizations and businesses.