Deniz Turgut 9e70c17839 import plugins from core and restructure repo | %!s(int64=11) %!d(string=hai) anos | |
---|---|---|
.. | ||
Readme.md | %!s(int64=11) %!d(string=hai) anos | |
__init__.py | %!s(int64=11) %!d(string=hai) anos | |
random_article.py | %!s(int64=11) %!d(string=hai) anos |
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.
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>