Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from opendata-swiss/add_redirect_for_article
Browse files Browse the repository at this point in the history
Redirect from the head with meta http-equiv
  • Loading branch information
kovalch authored Nov 12, 2024
2 parents 7fa2a29 + 3e06003 commit 0b76803
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
6 changes: 2 additions & 4 deletions theme/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@
title="{{ SITENAME }} {{ category }} ATOM Feed"/>
{% endif %}

{% if SITEURL == "https://opendata-swiss.github.io/ogd-handbook-site/en/library/ch-dcat-ap.html" %}
<script type="text/javascript">
window.location.href = "https://handbook.opendata.swiss/de/content/glossar/bibliothek/dcat-ap-ch.html";
</script>
{% if SITEURL == "//opendata-swiss.github.io/ogd-handbook-site/en/library/ch-dcat-ap.html" %}
<meta http-equiv="refresh" content="0; URL=https://handbook.opendata.swiss/de/content/glossar/bibliothek/dcat-ap-ch.html">
{% endif %}
</head>
<body class="page page-template-default{% if page %} page-{{ page.slug }}{% endif %}{% if article %} article-{{ article.slug }}{% endif %}">
Expand Down
9 changes: 1 addition & 8 deletions theme/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{% extends "article_list.html" %}

{% block canonical_rel %}
<link rel="canonical" href="{{ SITEURL }}">
{% if SITEURL == "https://opendata-swiss.github.io/ogd-handbook-site/en/library/ch-dcat-ap.html" %}
<script type="text/javascript">
window.location.href = "https://handbook.opendata.swiss/de/content/glossar/bibliothek/dcat-ap-ch.html";
</script>
{% endif %}
{% endblock %}
{% block canonical_rel %}<link rel="canonical" href="{{ SITEURL }}">{% endblock %}

{% block banner %}
{% include 'includes/banner.html' %}
Expand Down

0 comments on commit 0b76803

Please sign in to comment.