Make paths in index.html relative (#68)
Closes #67 Remove the top-level path (`/`) from all source links in index.html so that the template takes relative paths can work when hosted under a path, e.g. `https://emilk.github.io/eframe_template/`
This commit is contained in:
parent
be77c2a718
commit
e1e4fb8113
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>eframe template</title>
|
<title>eframe template</title>
|
||||||
<link rel="manifest" href="/manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white">
|
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white">
|
||||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#404040">
|
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#404040">
|
||||||
<link rel="apple-touch-icon" href="/icon_ios_touch_192.png">
|
<link rel="apple-touch-icon" href="icon_ios_touch_192.png">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
// We disable caching during development so that we always view the latest version.
|
// We disable caching during development so that we always view the latest version.
|
||||||
if ('serviceWorker' in navigator && window.location.hash !== "#dev") {
|
if ('serviceWorker' in navigator && window.location.hash !== "#dev") {
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
navigator.serviceWorker.register('/sw.js');
|
navigator.serviceWorker.register('sw.js');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue