Custom plugins for Pelican, used in the Varia website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
436 B

#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from pelican import signals
from os import listdir
from os.path import isfile, join
def getStream(page):
dir = 'content/stream'
images = [f for f in listdir(dir) if isfile(join(dir, f))]
print('>>> The stream is streaming!', images)
page.stream = 'jaja'
def register():
signals.page_generator_finalized.connect(getStream)
# signals.article_generator_finalized.connect(getStream)