The Basic Structure of a Plugin
All Movable Type plugins are organized by a simple set of files and directories. These files and directories contain all of the static files, templates and application code needed for the plugin to operate.
A plugin can typically be described most commonly by the following four primary components:
- A
config.yaml
or plugin configuration file. - A collection of Perl library files.
- A set of templates that govern the look and feel of pages within your plugin.
- A set of static images, javascript and css files used within your plugin templates, or by the published blog.
This translates into the following structure on your file system:
/path/to/mt/plugins/PluginName/config.yaml
/path/to/mt/plugins/PluginName/lib/*
/path/to/mt/plugins/PluginName/tmpl/*
/path/to/mt/mt-static/plugins/PluginName/*
Note: Technically there can be great variability in how authors organize their plugins as Movable Type does not actively enforce a rigid file structure or organization scheme. However, plugin developers are highly encouraged to follow the above organization to make it easier for users to install and administrators to maintain plugins on their system.