Commit 207c45f0 authored by Ana Guerrero López's avatar Ana Guerrero López

Add add_artist_line plugin

parent 84ebb664
......@@ -62,5 +62,5 @@ EXTRA_PATH_METADATA = {
# Plugins
PLUGINS = ["add_translator_line"]
PLUGINS = ["add_translator_line", "add_artist_line"]
PLUGIN_PATHS = ["plugins"]
This plugin adds the ``artist`` variable in the post when this variable
You can use the ``article.artist`` variable in your templates like
in this example:
{% if article.artist %}
{{ article.artist }}
{% endif %}
Copyright (C) 2018, Ana Guerrero López
This plugin is is licensed under the GNU GENERAL PUBLIC LICENSE version 2 or
from .add_artist_line import *
This plugin add the `artist` value to the article
from pelican import signals
def add_artist_line(generator):
for article in generator.articles:
if hasattr(article,'artist'):
artist = article.artist
def register():
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment