manymanymany-varia-websites/plugins/random_article
2018-02-01 14:46:15 +01:00
..
__init__.py adding the 2 submodules again 2018-02-01 14:46:15 +01:00
random_article.py adding the 2 submodules again 2018-02-01 14:46:15 +01:00
Readme.md adding the 2 submodules again 2018-02-01 14:46:15 +01:00

Random Article Plugin For Pelican

This plugin generates a html file which redirect to a random article using javascript's window.location. The generated html file is saved at SITEURL.

Only published articles are listed to redirect.

Usage

To use it you have to add in your config file the name of the file to use:

RANDOM = 'random.html'

Then in some template you add:

<a href="{{ SITEURL }}/{{ RANDOM }}">random article</a>