+// Url retrieval function
+window.baseUrl = function(path) {
+ let basePath = document.querySelector('meta[name="base-url"]').getAttribute('content');
+ if (basePath[basePath.length-1] === '/') basePath = basePath.slice(0, basePath.length-1);
+ if (path[0] === '/') path = path.slice(1);
+ return basePath + '/' + path;
+};
+