Skip to content
Permalink
Browse files

Resolve canonical link problem

  • Loading branch information...
da2x committed Aug 13, 2015
1 parent 45b42dd commit a78111917f8a294b5d109dbda0ccc6764a2abdbd
Showing with 3 additions and 4 deletions.
  1. +3 −4 output/index.html
@@ -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('');

0 comments on commit a781119

Please sign in to comment.
You can’t perform that action at this time.