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!
This commit is contained in:
Christopher Allan Webber
2013-05-16 10:38:45 -05:00
parent 8ca51d32b6
commit d6d2c771bd
3 changed files with 64 additions and 0 deletions

View File

@@ -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