mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
rss feed on hashtags #203
This commit is contained in:
parent
5de36b0c0a
commit
2fad5b051c
2 changed files with 14 additions and 4 deletions
|
@ -82,9 +82,9 @@ def show_tag_rss(tag):
|
||||||
description = None
|
description = None
|
||||||
og_image = None
|
og_image = None
|
||||||
fg = FeedGenerator()
|
fg = FeedGenerator()
|
||||||
fg.id(f"https://{current_app.config['SERVER_NAME']}/tag/{tag}")
|
fg.id(f"https://{current_app.config['SERVER_NAME']}/tag/{tag.name}")
|
||||||
fg.title(f'#{Tag.display_as} on {g.site.name}')
|
fg.title(f'#{tag.display_as} on {g.site.name}')
|
||||||
fg.link(href=f"https://{current_app.config['SERVER_NAME']}/tag/{tag}", rel='alternate')
|
fg.link(href=f"https://{current_app.config['SERVER_NAME']}/tag/{tag.name}", rel='alternate')
|
||||||
if og_image:
|
if og_image:
|
||||||
fg.logo(og_image)
|
fg.logo(og_image)
|
||||||
else:
|
else:
|
||||||
|
@ -93,7 +93,7 @@ def show_tag_rss(tag):
|
||||||
fg.subtitle(description)
|
fg.subtitle(description)
|
||||||
else:
|
else:
|
||||||
fg.subtitle(' ')
|
fg.subtitle(' ')
|
||||||
fg.link(href=f"https://{current_app.config['SERVER_NAME']}/tag/{tag}/feed", rel='self')
|
fg.link(href=f"https://{current_app.config['SERVER_NAME']}/tag/{tag.name}/feed", rel='self')
|
||||||
fg.language('en')
|
fg.language('en')
|
||||||
|
|
||||||
for post in posts:
|
for post in posts:
|
||||||
|
|
|
@ -61,6 +61,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<div class="card mt-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<h2>{{ _('RSS') }}</h2>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<p><a class="no-underline" href="{{ rss_feed }}" rel="nofollow"><span class="fe fe-rss"></span> </a><a href="{{ rss_feed }}" rel="nofollow">RSS feed</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% include "_inoculation_links.html" %}
|
{% include "_inoculation_links.html" %}
|
||||||
</aside>
|
</aside>
|
||||||
|
|
Loading…
Add table
Reference in a new issue