From 57487b277109bb428e4509c50354422e00eec718 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Tue, 15 Oct 2024 08:35:51 +0200 Subject: [PATCH] small bugfix, as the Writer no longer as the site_url --- activitypub.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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' } ]