pelican/docs
Vladimír Vondruš b4a09947dc Introduce Jinja2 filters for converting links in additional fields.
Until now, the link replacing worked only on article and page
contents or summaries. With this patch, if one needes to replace
links in custom fields, there are two new Jinja2 filters that can do
that. For fields that are referenced in the `FORMATTED_FIELDS` setting,
one can use the `expand_links` Jinja2 filter in the template, passing
the field name as a parameter:

    {{ article|expand_links('legal') }}

If the custom field consists of just one link (for example a link to
article cover image for a social meta tag), one can use the
`expand_link` Jinja2 filter:

    {{ article|expand_link('cover') }}

With the above being in a template and `FORMATTED_FIELDS` setting
containing the `'legal'` field, a RST article making use of both fields
could look like this:

    An article
    ##########

    📅 2017-06-22
    :legal: This article is released under `CC0 {filename}/license.rst`.
    :cover: {filename}/img/article-cover.jpg
2017-08-07 17:28:21 +02:00
..
_static Really fix #1311 by declaring CSS overrides as !important 2014-04-28 22:08:34 +02:00
changelog.rst Introduce Jinja2 filters for converting links in additional fields. 2017-08-07 17:28:21 +02:00
conf.py Fix copyright year to date of first publication 2017-07-19 13:29:04 -07:00
content.rst Introduce Jinja2 filters for converting links in additional fields. 2017-08-07 17:28:21 +02:00
contribute.rst Implement review feedback 2017-02-28 07:39:47 +01:00
faq.rst Remove spurious whitespace in documentation source 2016-12-03 14:53:26 -08:00
importer.rst Correct Dotclear sample file link in importer docs 2015-02-18 09:41:27 -08:00
index.rst Enhance feedback and contributing guidelines 2014-06-30 18:34:18 -07:00
install.rst Minor typo in docs 2016-04-09 09:05:17 -04:00
internals.rst Avoid Markdown 2.6 deprecations; make MD_EXTENSIONS a dict 2015-11-30 18:12:28 +01:00
Makefile Add the docs 2010-10-13 23:08:08 +01:00
pelican-themes.rst Fix spelling mistakes in docs 2015-05-24 13:08:23 +01:00
plugins.rst Add new signal: feed_generated 2017-01-16 11:33:13 +01:00
publish.rst Remove spurious whitespace in documentation source 2016-12-03 14:53:26 -08:00
quickstart.rst Localize default lang and timezone in pelican-quickstart 2016-10-02 13:22:26 -04:00
report.rst Eliminate extraneous whitespace 2012-10-12 23:01:50 +02:00
settings.rst Merge pull request #1982 from adeverteuil/feature_check_static_modified 2017-06-22 12:49:26 -07:00
themes.rst remove PAGES; use pages instead 2015-06-27 19:11:55 +02:00
tips.rst Use better headers in tips docs 2017-01-14 13:51:10 +01:00