Refactored alternate_url_json mechanism, refs #1620, #1533

This commit is contained in:
Simon Willison 2022-02-02 13:32:47 -08:00
commit 8d5779acf0
10 changed files with 27 additions and 62 deletions

View file

@ -10,6 +10,9 @@
{% for url in extra_js_urls %}
<script {% if url.module %}type="module" {% endif %}src="{{ url.url }}"{% if url.sri %} integrity="{{ url.sri }}" crossorigin="anonymous"{% endif %}></script>
{% endfor %}
{%- if alternate_url_json -%}
<link rel="alternate" type="application/json+datasette" href="{{ alternate_url_json }}">
{%- endif -%}
{%- block extra_head %}{% endblock -%}
</head>
<body class="{% block body_class %}{% endblock %}">