Compare commits

..

No commits in common. "604f9ff8f27d39332a467e037467c1d5a273bb68" and "8678a764d7c73722610fe0680ec97372932fd36e" have entirely different histories.

2 changed files with 6 additions and 7 deletions

View file

@ -4,7 +4,6 @@ import logging
import json
import os
import urllib.parse
import pelican.writers
from pelican import signals
@ -12,12 +11,12 @@ from pelican import signals
log = logging.getLogger(__name__)
__version__ = '0.1.1'
__version__ = '0.1'
pagination = 25
def ap_article(generator: pelican.ArticlesGenerator, writer: pelican.writers.Writer):
def ap_article(generator, writer):
now = datetime.datetime.utcnow()
@ -44,7 +43,7 @@ def ap_article(generator: pelican.ArticlesGenerator, writer: pelican.writers.Wri
wknodeinfo = {
'links': [
{
'href': os.path.join(generator.settings['SITEURL'], 'activitypub/nodeinfo'),
'href': os.path.join(writer.site_url, 'activitypub/nodeinfo'),
'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.0'
}
]
@ -106,7 +105,7 @@ def ap_article(generator: pelican.ArticlesGenerator, writer: pelican.writers.Wri
path = os.path.join(writer.output_path, 'activitypub/tags', t.slug)
articles = []
for article in generator.articles:
if t.name not in article.metadata['tags']:
if t.name not in article.tags:
continue
articles.append(
os.path.join(generator.settings['SITEURL'], 'activitypub/posts', article.slug)
@ -126,7 +125,7 @@ def ap_article(generator: pelican.ArticlesGenerator, writer: pelican.writers.Wri
aurl = os.path.join(generator.settings['SITEURL'], 'activitypub/posts', article.slug)
apath = os.path.join(writer.output_path, 'activitypub/posts', article.slug)
tags = []
for tag in article.metadata.get('tags', []):
for tag in article.tags:
tags.append({
'type': 'Hashtag',
'name': '#' + tag.slug,

View file

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