Movable Type Enterprise Documentation

Back to docs index

Chapter Blog settings - publishing

In this section:


By default, Movable Type publishes a blog's archives into subdirectories of the Site Root. For a Site Root of /var/www/htdocs/blog, the following are examples of file system paths to pages created for each of the archive types enabled by default:

  • Category archive: /var/www/htdocs/blog/politics/presidents.html
  • Monthly archive: /var/www/htdocs/blog/2005/03/index.html
  • Individual archive: /var/www/htdocs/blog/2005/03/presidents.html

However, there may be a case in which you desire to publish the archives elsewhere, outside of the Site Root hierarchy, or to provide a distinct URL for accessing them (e.g. using a subdomain).

If so, you can choose to turn on Advanced Archive Publishing option, which will allow you to specify the base Archive URL and Archive Root. These two options share the same basic descriptions as the Site URL and Site Root, except that specify the base paths for the publishing of the archives.

NOTE: If you simply wish to have all of the subdirectories created for the archives (e.g. /2005 and /politics in the examples above) contained in a single directory (e.g. /archives), you should prepend the extra path information to your Archive Map File Paths found in the Archive Mapping table instead of using this option.

If you have chosen Advanced Archive Publishing, this setting dictates the root URL for your archives.

Example: http://archives.example.com/

The rest of the URL for each archive file is created in the format specified in the Archive Map file path for each particular type of archive in the archive mapping section of the weblog's publishing settings screen.

If your Archive URL is identical to or underneath (in hierarchy) your Site URL, it is recommended that you do not use Advanced Archive publishing, but instead add the extra path information specified in the Archive URL to the beginning of your Archive Map File Path.

For example, if your Site URL is http://www.example.com/ and your Archive URL is http://www.example.com/archives/, you would add archives/ to the beginning of each of your archive file paths (using the Custom option in the dropdown), and disable Advanced Archive Publishing.

This is the default file extension that will be appended to your path of all category, date-based and individual archive files. You should omit the leading period as that is inserted automatically by the system. If for some reason you prefer to have no file extension on your files, you can leave this field blank.

Example: html

The archive file path is a recipe for creating the path and filename to an archive file relative to the blog's Site URL. Under static publishing, it is also used as the part of the path after the Site Root describing where a particular archive file should be published.

Most common archive map file paths are provided in the dropdown for each archive type. In addition, you can use the Custom choice to customize the setting to your liking.

Creating a custom archive map file path

Customized archive map file paths can be formed using:

  • Movable Type template tags (e.g. <MTArchiveDate format="%Y/%m/index.html">)
  • Format specifiers
  • Text, for including parent archive directories or arbitrary parts of the path
  • Any combination of the above

The set of shorthand specifiers are listed in Appendix E and you can see those used in creating any of the provided drop down options by selecting the option you are interested in and then subsequently selecting the "Custom" option.

When constructing the output path and URL there are two possibilities depending on whether you have selected Advanced Archive Publishing on the Weblog Settings » Publishing screen.

Without Advanced Archive Publishing enabled:

Site URL or Site Root + Archive Map File Path + File extension for Archive Files

With Advanced Archive Publishing enabled:

Archive URL or Archive Root + Archive Map File Path + File extension for Archive Files

This setting informs the system which of your archive maps is preferred for an archive type which has more than one template assigned.

Movable Type allows you to have multiple archive maps for each type of archiving, Category, Date-based and Individual. However, when you link to an archive type (e.g. using <MTArchiveList archive_type="Individual">) which has multiple archive maps, the system must know which of the archive maps is preferred in forming links. The radio button next to the archive maps is used to set this preference.

It's important to note that this choice is only available if you have more than one archive map assigned for a particular archive type. Otherwise, the single existing template map is your default preference.

An archive map template is a template that is used to produce archive files for a particular archive type (Individual, Monthly, Weekly, Daily, Category). The templates used can be found in and edited from your weblog's Archive template listing.

An archive map is an association of an archive type or grouping of entries (Individual, Category, Monthly, Weekly, Daily) with the template used to build a page containing the grouping of entries. By creating and editing archive maps, you can control with fine granularity how Movable Type publishes files.

For example, by default Movable Type provides you with three active archive maps: one for publishing individual entries, monthly archives and category archives. Those three archive types are matched with the Individual Entry Archive, Date-based Archive and Category Archive templates, respectively, which are also included by default in your Archive template listing.

The archive maps also contain an archive map file path, which dictates where the archive files should be wrriten to and what their URLs should be. If you have more than one template assigned to an archive type, you are also given a choice to indiciate which is your preferred archive map.

If you have chosen Advanced Archive Publishing, this setting dictates the root filesystem path for your archives. An absolute path (a path starting with /) is preferred, because it is not dependent on the location of your Movable Type directory; but if you choose to use a relative path, the path should be relative to your Movable Type directory.

Example: /usr/home/melody/www/archives

The rest of the path for each archive file is created in the format specified in the Archive Map file path for each particular type of archive in the archive mapping section of the weblog's publishing settings screen.

If your Archive Root is identical to or underneath (in hierarchy) your Site Root, it is recommended that you do not use Advanced Archive publishing, but instead add the extra path information specified in the Archive Root to the beginning of your Archive Map File Path.

For example, if your Site Root is /usr/home/melody/www and your Archive Root is /usr/home/melody/www/archives, you would add archives/ to the beginning of each of your archive file paths (using the Custom option in the dropdown), and disable Advanced Archive Publishing.

This option controls whether Movable Type publishes files statically (the default), dynamically or some combination of the two. For more details see the relevant section of Chapter 7 in the Users and Administrators Guide entitled "Enabling Dynamic Publishing".

You can download the Users and Administrators Guide here.

Movable Type allows you to select multiple types of archiving, however when linking to an archived entry — for example using MTEntryPermalink with no archive_type attribute — or when using MTArchiveList (again, with no archive_type attribute) in your master archive index, the system needs to know which type of archive to link to. You can think of this as your default archiving type.

You can only choose from Archive Types which are enabled for the weblog (see Archive Mapping); if you have not enabled any Archive Types, then "No Archives" will become your Preferred Archive Type by default (i.e., no other choices will be available).

This setting defines the full base URL to the root of the blog. So, using the default configuration and templates, if your blog was located at:

http://www.example.com/blog/index.html

your site URL setting would be:

http://www.example.com/blog/

This is a required field and is set initially when a blog is created.

You should never set your Site URL to the same value as the URL to your Movable Type application directory (i.e. the CGIPath configuration directive in mt-config.cgi).

By doing so, the system will publish your weblog content to the Movable Type application directory which can lead to numerous problems such as inadvertent overwriting of Movable Type distribution files and can potentially be a security hazard.

The Site root is the file system analog to the Site URL and defines the top-level directory into which Movable Type will publish it's static files and subdirectory hierarchy for the blog.

Example:

/home/melody/public/blog

An absolute path like the one above is strongly encouraged, but a relative path (e.g. "../" meaning one directory up in the hierarchy) is supported and is relative to the Movable Type directory.

This is a required field and is set initially when a new blog is created.

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.