aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-05-16 10:38:45 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-05-23 13:33:07 -0500
commitd6d2c771bdc111cd26186b1bc42b44f2b3197e05 (patch)
tree2a046eea2ccf694ce71209c8b72d20deb9b51203 /docs/source
parent8ca51d32b66b96043c8685aac1e478111612c980 (diff)
downloadmediagoblin-d6d2c771bdc111cd26186b1bc42b44f2b3197e05.tar.lz
mediagoblin-d6d2c771bdc111cd26186b1bc42b44f2b3197e05.tar.xz
mediagoblin-d6d2c771bdc111cd26186b1bc42b44f2b3197e05.zip
Start of ability to have plugins provide static resources!
Note I have not tested any of this yet ;) But we're already on our way: - We've got docs - The hook is there Lots to do still though. But, progress! :) This commit sponsored by Laura Arjona Reina. Thanks larjona!
Diffstat (limited to 'docs/source')
-rw-r--r--docs/source/pluginwriter/api.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/source/pluginwriter/api.rst b/docs/source/pluginwriter/api.rst
index 5e0568fd..cd06cbc5 100644
--- a/docs/source/pluginwriter/api.rst
+++ b/docs/source/pluginwriter/api.rst
@@ -125,3 +125,22 @@ context... it is added to the actual context of each individual
template render right before it is run! Because of this you also can
do some powerful and crazy things, such as checking the request object
or other parts of the context before passing them on.
+
+
+Adding static resources
+-----------------------
+
+It's possible to add static resources for your plugin. Say your
+plugin needs some special javascript and images... how to provide
+them? Then how to access them? MediaGoblin has a way!
+
+
+Attaching to the hook
++++++++++++++++++++++
+
+First, you need to register your plugin's resources with the hook.
+This is pretty easy actually: you just need to provide a function that
+passes back a PluginStatic object.
+
+.. automodule:: mediagoblin.tools.staticdirect
+ :members: PluginStatic