-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matt Layman
committed
Mar 20, 2015
1 parent
bc7bf68
commit 05b7253
Showing
5 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.. _extensions: | ||
|
||
Extensions | ||
========== | ||
|
||
In addition to :ref:`composers`, handroll has an extension system | ||
to plug in other functionality. | ||
Users enable extensions | ||
by adding ``with_* = true`` to their ``site`` section | ||
in the configuration file, | ||
where ``*`` is the name of the extension. | ||
For example, the blog extension is named ``blog``, | ||
and ``with_blog = true`` will enable it. | ||
|
||
Extension authors can use the base ``Extension`` | ||
to create new extensions. | ||
Extensions are never directly called, | ||
but an extension can connect to one of handroll's :ref:`signals`. | ||
|
||
.. autoclass:: handroll.extensions.base.Extension | ||
|
||
Extension authors can include new extensions by adding to the | ||
``handroll.extensions`` entry point. For example, handroll includes | ||
the following entry point in ``setup.py``: | ||
|
||
.. code-block:: python | ||
entry_points={ | ||
'handroll.extensions': [ | ||
'blog = handroll.extensions.blog:BlogExtension', | ||
] | ||
} | ||
Built-in extensions | ||
=================== | ||
|
||
.. _blogextension: | ||
|
||
Blog extension | ||
-------------- | ||
|
||
.. autoclass:: handroll.extensions.blog.BlogExtension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.. _signals: | ||
|
||
Signals | ||
======= | ||
|
||
|