Skip to content

Commit

Permalink
Resolve canonical link problem
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Aug 13, 2015
1 parent 45b42dd commit a781119
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions output/index.html
Expand Up @@ -279,18 +279,17 @@ <h2>Plugins for Nikola <small>version
// DEFAULT VERSION SET HERE
var current_version = 7;
var already_initialized = false;
var canonical = 'https://plugins.getnikola.com/';
var canonical = document.querySelector('link[rel="canonical"]');
fetch(current_version);
already_initialized = true;
function hash_handler() {
if (location.hash) {
plugin = location.hash.slice(1);
canonical = canonical + '#' + plugin;
canonical.href = 'https://plugins.getnikola.com/#' + plugin;
}
else {
plugin = null;
canonical.href = 'https://plugins.getnikola.com/';
}
document.querySelector('link[rel="canonical"]').href=canonical;
// Show plugin data
container = $('#rightside');
container.html('');
Expand Down

0 comments on commit a781119

Please sign in to comment.