summaryrefslogtreecommitdiffstats
path: root/__init__.py
blob: b6023b53d55e04db9040a633c300b81b9e0b9615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# SPDX-FileCopyrightText: 2023 Agathe Porte
#
# SPDX-License-Identifier: MIT

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)