Add onion-location header (#2234)

This commit is contained in:
Jonah Aragon 2023-07-12 15:35:39 -05:00
parent 1c9a1a805d
commit cf0d62ef7c
No known key found for this signature in database
5 changed files with 371 additions and 94 deletions

View file

@ -86,6 +86,11 @@
{% else %}{% endif %}{% endblock %}
{% block extrahead %}
<meta name="robots" content="max-snippet:-1, max-image-preview:large">
{% if config.extra.context == "production" %}
<meta http-equiv="onion-location" content="{{ "http://www.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/" ~ config.theme.language ~ "/" ~ page.url }}" />
{% elif config.extra.deploy %}
<meta http-equiv="onion-location" content="{{ "http://" ~ config.extra.deploy ~ ".netlify.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/" ~ config.theme.language ~ "/" ~ page.url }}" />
{% endif %}
{% if page and page.meta and page.meta.schema %}
<script type="application/ld+json">
{{ page.meta.schema|tojson }}

View file

@ -78,7 +78,7 @@
{% for alt in config.extra.alternate %}
<li class="md-select__item">
<a href="{{ "/" ~ alt.lang ~ "/" ~ page.url }}" hreflang="{{ alt.lang }}" class="md-select__link">
<img alt="{{ config.theme.language }}" class="twemoji" src="{{ alt.icon }}">
<img alt="{{ alt.lang }}" class="twemoji" src="{{ alt.icon }}">
{{ alt.name }}
</a>
</li>