Suriya Subramanian 6097169e4d Fix builtin commands handling in the linker plugin | 7 yıl önce | |
---|---|---|
.. | ||
Readme.md | 9 yıl önce | |
__init__.py | 9 yıl önce | |
content_objects.py | 9 yıl önce | |
linker.py | 7 yıl önce | |
mailto.py | 9 yıl önce |
This plugin allows to define custom linker commands in analogy to the builtin
{filename}
, {attach}
, {category}
, {tag}
, {author}
, and {index}
syntax.
{mailto}
Purpose: Helps to create mailto:
links with javascript (JS) on top of a
non-JS fallback.
How the HTML code is replaced step by step
<a href="{mailto}webmaster" rel="nofollow">Send me a mail</a>
'jroznfgre' = rot_13('webmaster')
):<a href="/mailto/jroznfgre/" rel="nofollow">Send me a mail</a>
<a href="mailto:webmaster@example.com" rel="nofollow">Send me a mail</a>
mailto/jroznfgre/index.html
is generated using the template
mailto_fallback
.Usage instruction
{mailto}
plugin usingPLUGINS = ['linker.mailto']
mailto_fallback
template (accessing mailto
which is injected
into the template)content_objects
This plugin collects all pelican.contents.Content
instances in a set
which
can be accessed using context['content_objects']
.