Add the alternate link for all activitypub stuff in the templates

This commit is contained in:
Thomas Sileo 2018-07-10 23:19:00 +02:00
parent c9a10bddb4
commit 524a63235d
7 changed files with 18 additions and 9 deletions

View file

@ -18,4 +18,6 @@
</div> </div>
{% endblock %} {% endblock %}
{% block links %}{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %} {% block links %}
<link rel="alternate" href="{{ config.BASE_URL }}/followers" type="application/activity+json">
{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %}

View file

@ -18,4 +18,6 @@
</div> </div>
{% endblock %} {% endblock %}
{% block links %}{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %} {% block links %}
<link rel="alternate" href="{{ config.BASE_URL }}/following" type="application/activity+json">
{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %}

View file

@ -54,4 +54,8 @@
</div> </div>
{% endblock %} {% endblock %}
{% block links %}{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %} {% block links %}<link rel="alternate" href="{{ config.ME.url | get_url }}" title="ActivityPub profile" type="application/activity+json">
<link rel="alternate" href="{{ config.ID }}/feed.json" type="application/json" title="JSON Feed">
<link rel="alternate" href="{{ config.ID }}/feed.rss" type="application/rss+xml" title="RSS">
<link rel="alternate" href="{{ config.ID }}/feed.atom" type="application/atom+xml" title="Atom 0.3">
{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %}

View file

@ -8,12 +8,7 @@
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous"> <link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
<link rel="authorization_endpoint" href="{{ config.ID }}/indieauth"> <link rel="authorization_endpoint" href="{{ config.ID }}/indieauth">
<link rel="token_endpoint" href="{{ config.ID }}/token"> <link rel="token_endpoint" href="{{ config.ID }}/token">
<link rel="micropub" href="{{ config.ID }}/micropub">
{% if not request.args.get("older_than") and not request.args.get("previous_than") %}<link rel="canonical" href="https://{{ config.DOMAIN }}{{ request.path }}">{% endif %} {% if not request.args.get("older_than") and not request.args.get("previous_than") %}<link rel="canonical" href="https://{{ config.DOMAIN }}{{ request.path }}">{% endif %}
<link rel="alternate" href="{{ config.ME.url | get_url }}" title="ActivityPub profile" type="application/activity+json">
<link rel="alternate" href="{{ config.ID }}/feed.json" type="application/json" title="JSON Feed">
<link rel="alternate" href="{{ config.ID }}/feed.rss" type="application/rss+xml" title="RSS">
<link rel="alternate" href="{{ config.ID }}/feed.atom" type="application/atom+xml" title="Atom 0.3">
{% block links %}{% endblock %} {% block links %}{% endblock %}
{% if config.THEME_COLOR %}<meta name="theme-color" content="{{ config.THEME_COLOR }}">{% endif %} {% if config.THEME_COLOR %}<meta name="theme-color" content="{{ config.THEME_COLOR }}">{% endif %}
<style>{{ config.CSS | safe }}</style> <style>{{ config.CSS | safe }}</style>

View file

@ -29,4 +29,6 @@
</div> </div>
{% endblock %} {% endblock %}
{% block links %}{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %} {% block links %}
<link rel="alternate" href="{{ config.BASE_URL }}/liked" type="application/activity+json">
{{ utils.display_pagination_links(older_than, newer_than) }}{% endblock %}

View file

@ -19,3 +19,4 @@
{{ utils.display_thread(thread, likes=likes, shares=shares) }} {{ utils.display_thread(thread, likes=likes, shares=shares) }}
</div> </div>
{% endblock %} {% endblock %}
{% block links %}<link rel="alternate" href="{{ note.activity.object.id}}" type="application/activity+json">{% endblock %}

View file

@ -29,3 +29,6 @@
</div> </div>
{% endblock %} {% endblock %}
{% block links %}
<link rel="alternate" href="{{ config.BASE_URL }}/tags/{{tag}}" type="application/activity+json">
{% endblock %}