Browse Source

added the missing line (loop through pages) that makes the stream plugin work

master
mb @ ts 7 years ago
parent
commit
5364009530
  1. 9
      stream/stream.py

9
stream/stream.py

@ -4,13 +4,14 @@
from pelican import signals from pelican import signals
from os import listdir from os import listdir
from os.path import isfile, join from os.path import isfile, join
# import os
def getStream(page): def getStream(generator):
dir = 'content/stream' for page in generator.pages:
dir = "/var/www/stream"
images = [f for f in listdir(dir) if isfile(join(dir, f))] images = [f for f in listdir(dir) if isfile(join(dir, f))]
print('>>> The stream is streaming!', images) print('>>> The stream is streaming!', images)
page.stream = 'jaja' page.stream = images
def register(): def register():
signals.page_generator_finalized.connect(getStream) signals.page_generator_finalized.connect(getStream)
# signals.article_generator_finalized.connect(getStream)

Loading…
Cancel
Save