Skip to content

Commit

Permalink
Update docs to cover latest changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
playpauseandstop committed Apr 1, 2013
1 parent 5a85029 commit fc58190
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ are optional.
page, and return its HTML rendering as a unicode string. Defaults to
:func:`~.pygmented_markdown`.

``FLATPAGES_MARKDOWN_EXTENSIONS``
.. versionadded:: 0.4

List of Markdown extensions to use with default HTML renderer. Defaults to
``['codehilite']``.

``FLATPAGES_AUTO_RELOAD``
Wether to reload pages at each request. See :ref:`laziness-and-caching`
for more details. The default is to reload in ``DEBUG`` mode only.
Expand Down Expand Up @@ -122,6 +128,25 @@ and in templates:

<link rel="stylesheet" href="{{ url_for('pygments_css') }}">

Using custom Markdown extensions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 0.4

By default, Flask-FlatPages renders flatpage body using `Markdown`_ with
`Pygments`_ format. This means passing ``['codehilite']`` extensions list to
``markdown.markdown`` function.

But sometimes you need to customize things, like using another extension or
disable default approach, this possible by passing special config.

For example, using another extension::

FLATPAGES_MARKDOWN_EXTENSIONS = ['codehilite', 'headerid']

Or disabling default approach::

FLATPAGES_MARKDOWN_EXTENSIONS = []

.. _laziness-and-caching:

Expand Down Expand Up @@ -220,8 +245,10 @@ Changelog
Version 0.4
~~~~~~~~~~~

Not released yet.
Released on 2013-04-01

* Add ``FLATPAGES_MARKDOWN_EXTENSIONS`` config to setup list of Markdown
extensions to use with default HTML renderer.
* Fix a bug with non-ASCII filenames.


Expand Down

0 comments on commit fc58190

Please sign in to comment.