Documenting plugin configuration
authorChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 8 May 2013 15:57:23 +0000 (10:57 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 8 May 2013 16:03:09 +0000 (11:03 -0500)
This commit sponsored by David Krupicz.  Thanks, David!

docs/source/pluginwriter/api.rst

index 6323f71307f7947ee53e5e55a09ac4057e747122..df93351142710b9fdd1fcc69dccca3a57a36b3b5 100644 (file)
@@ -32,3 +32,19 @@ Please check the release notes for updates!
    :members: get_config, register_routes, register_template_path,
              register_template_hooks, get_hook_templates,
              hook_handle, hook_runall, hook_transform
+
+Configuration
+-------------
+
+Your plugin may define its own configuration defaults.
+
+Simply add to the directory of your plugin a config_spec.ini file.  An
+example might look like::
+
+  [plugin_spec]
+  some_string = string(default="blork")
+  some_int = integer(default=50)
+
+This means that when people enable your plugin in their config you'll
+be able to provide defaults as well as type validation.
+