Skip to content

Commit

Permalink
Merge pull request #3 from hlxsites/main
Browse files Browse the repository at this point in the history
Merge from original main
  • Loading branch information
FelipeSimoes authored Jul 29, 2024
2 parents 1623a9c + 4890729 commit f19db17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
6 changes: 0 additions & 6 deletions :

This file was deleted.

13 changes: 8 additions & 5 deletions head.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<!-- test change -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script>
const baseMeta = document.querySelector('meta[name="basepath"]');
if (baseMeta) {
const base = document.createElement('base');
base.href = `${baseMeta.content || ''}/`;
document.head.appendChild(base);
const base = document.createElement('base');
if (!baseMeta || !baseMeta.content || baseMeta.content === '/') {
base.href = '/';
} else {
base.href = `${baseMeta.content}/`;
}
document.head.appendChild(base);
document.querySelectorAll('a[href^="http://~/"]').forEach((a) => {
a.href = a.href.replace('http://~/', '');
});
Expand All @@ -28,4 +31,4 @@
<script src="/scripts/component-loader.js" type="module"></script>
<script src="/scripts/libs.js" type="module"></script>
<script src="/scripts/init.js" type="module"></script>
<template class="theming"></template>
<template class="theming"></template>

0 comments on commit f19db17

Please sign in to comment.