Skip to content

Commit

Permalink
Add onion-location header
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Jul 12, 2023
1 parent 1502f1b commit 29777a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/mkdocs-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

extra:
context: !ENV [CONTEXT, "production"]
build: !ENV BUILD_ID
social:
- icon: simple/mastodon
link: https://mastodon.neat.computer/@privacyguides
Expand Down
5 changes: 5 additions & 0 deletions theme/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -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/" ~ page.url }}" />
{% elif config.extra.build %}
<meta http-equiv="onion-location" content="{{ "http://" ~ config.extra.build ~ ".netlify.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/" ~ page.url }}" />
{% endif %}
{% if page and page.meta and page.meta.schema %}
<script type="application/ld+json">
{{ page.meta.schema|tojson }}
Expand Down

0 comments on commit 29777a4

Please sign in to comment.