diff --git a/activitypub.py b/activitypub.py index f2b9e7c..f42c6aa 100644 --- a/activitypub.py +++ b/activitypub.py @@ -4,6 +4,7 @@ import logging import json import os import urllib.parse +import pelican.writers from pelican import signals @@ -16,7 +17,7 @@ __version__ = '0.1' pagination = 25 -def ap_article(generator, writer): +def ap_article(generator: pelican.ArticlesGenerator, writer: pelican.writers.Writer): now = datetime.datetime.utcnow() @@ -43,7 +44,7 @@ def ap_article(generator, writer): wknodeinfo = { 'links': [ { - 'href': os.path.join(writer.site_url, 'activitypub/nodeinfo'), + 'href': os.path.join(generator.settings['SITEURL'], 'activitypub/nodeinfo'), 'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.0' } ]