diff --git a/activitypub.py b/activitypub.py index ed0145d..9205535 100644 --- a/activitypub.py +++ b/activitypub.py @@ -106,7 +106,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.tags: + if t.name not in article.metadata['tags']: continue articles.append( os.path.join(generator.settings['SITEURL'], 'activitypub/posts', article.slug) @@ -126,7 +126,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.tags: + for tag in article.metadata.get('tags', []): tags.append({ 'type': 'Hashtag', 'name': '#' + tag.slug,