history.pushState experiment

parent 72c8541a
(function() {
const canonicalUrl = document.querySelector("link[rel='canonical']").href;
console.log(canonicalUrl);
const x = {
title: document.title,
url: canonicalUrl,
};
console.log(x);
// FIXME: Doesn't work on http (localhost)
history.pushState(x, x.title, x.url)
})();
\ No newline at end of file
......@@ -41,7 +41,7 @@
{# Canonical URL #}
{% if canonical_url %}
<meta property="canonical" content="{{ url_prefix() }}{{ canonical_url }}" />
<link rel="canonical" href="{{ url_prefix() }}{{ canonical_url }}" />
<meta property="og:url" content="{{ url_prefix() }}{{ canonical_url }}" />
{% endif %}
......
......@@ -51,5 +51,6 @@
{% endblock %}
{% block javascripts %}
<script src="/assets/js/pages/tld/show.js"></script>
{# <script src="/assets/js/pages/dns/show/reverse-fetch.js" async defer></script> #}
{% endblock %}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment