Spell-check the entire documentation.
[mediagoblin.git] / mediagoblin / plugins / trim_whitespace / README.rst
CommitLineData
99454686
SS
1=======================
2 Trim whitespace plugin
3=======================
4
9650aa39 5MediaGoblin templates are written with 80 char limit for better
f4a5325e
BP
6readability. However that means that the HTML output is very verbose
7containing *lots* of whitespace. This plugin inserts a middleware that
8filters out whitespace from the returned HTML in the ``Response()``
9objects.
99454686 10
f4a5325e
BP
11Simply enable this plugin by putting it somewhere where Python can reach
12it and put it's path into the ``[plugins]`` section of your
13``mediagoblin.ini`` or ``mediagoblin_local.ini`` like for example this:
14
15.. code-block:: ini
99454686
SS
16
17 [plugins]
18 [[mediagoblin.plugins.trim_whitespace]]
19
20There is no further configuration required. If this plugin is enabled,
f4a5325e 21all *text/html* documents should not have lots of whitespace in between
99454686
SS
22elements, although it does a very naive filtering right now (just keep
23the first whitespace and delete all subsequent ones).
24
25Nonetheless, it is a useful plugin that might serve as inspiration for
26other plugin writers.
27
28It was originally conceived by Sebastian Spaeth. It is licensed under
29the GNU AGPL v3 (or any later version) license.
30