summaryrefslogtreecommitdiffstats
path: root/__init__.py
blob: 5272f27d4da1330e81ba2d7ec6829e4a0937ca68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import datetime

from pelican import signals


def fetch(gen, metadata):
    """Function called upon article generation context fetching."""
    gen.context['gen_date'] = datetime.date.today().isoformat()


def register():
    """Register Pelican signals to dedicated functions."""
    signals.article_generator_context.connect(fetch)