This commit is contained in:
2022-07-01 15:14:05 +02:00
parent aff9a36c4a
commit 96c2695de4
2 changed files with 6 additions and 10 deletions

View File

@ -491,24 +491,20 @@ def Main(Args, FeedEntries):
SiteDomain,
SiteLang,
Locale)
#print(MastodonPosts)
else:
MastodonPosts = []
for File, Content, Titles, Meta, HTMLContent, Description, Image in Pages:
#if Meta['Type'] == 'Post':
File = 'public/{}.html'.format(StripExt(File))
Content = ReadFile(File)
Post = ''
for p in MastodonPosts:
#print(SiteDomain + File[len('public/'):])
if p['Link'] == SiteDomain + '/' + File[len('public/'):]:
Post = '<br><h3>{StrComments}</h3><a href="{URL}" rel="noopener" target="_blank">{StrOpen} ↗️</a>'.format(
StrComments=Locale['Comments'],
StrOpen=Locale['OpenInNewTab'],
URL=p['Post'])
break
#print(Post)
Content = Content.replace('[HTML:Comments]', Post)
WriteFile(File, Content)