Statically generate canonical link tag instead.

This commit is contained in:
Kalila L 2021-05-31 06:39:52 -04:00
parent 2a6e0f0efc
commit 8b66c22655
3 changed files with 6 additions and 8 deletions

View file

@ -2,6 +2,9 @@
"opts": {
"template": "hifi-jsdoc-template"
},
"deploy": {
"root": "https://apidocs.vircadia.dev/"
},
"docdash": {
"meta": {
"title": "Vircadia API Docs",

View file

@ -380,8 +380,8 @@ function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) {
itemsNav += "</ul>";
}
itemsNav += '</li>';
itemsSeen[item.longname] = true;
}

View file

@ -13,6 +13,7 @@
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<?js= '<link rel="canonical" href="' + env.conf.deploy.root + title + '.html">' ?>
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<link type="text/css" rel="stylesheet" href="styles/night.css">
@ -33,12 +34,6 @@
}
</style>
<script>
var headID = document.getElementsByTagName('head')[0];
var link = document.createElement('link');
link.rel = 'canonical';
link.href = window.location.href;
headID.appendChild(link);
//We are running the check here to preload the theme because it may load the incorrect one first for a split second.
var isLocalStorageSupported = false;
try { // Edge browsing files on local file system doesn't support localStorage.