small bugfix, as the Writer no longer as the site_url

This commit is contained in:
Tobias Schmidl 2024-10-15 08:35:51 +02:00
parent 8678a764d7
commit 0c0bce3688
2 changed files with 5 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import logging
import json
import os
import urllib.parse
import pelican.writers
from pelican import signals
@ -11,12 +12,12 @@ from pelican import signals
log = logging.getLogger(__name__)
__version__ = '0.1'
__version__ = '0.1.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'
}
]

View file

@ -4,7 +4,7 @@
[project]
name = "pelican-plugin-activitypub"
version = "0.1.0"
version = "0.1.1"
description = "Pelican plugin implementing Activitypub"
authors = [{name = "s3lph", email = "s3lph@kabelsalat.ch"}, {name = "Tobias Schmidl", email = "tobias@schmidl.dev"}]
license = { text = "MIT" }