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:
Tim Hopp 2022-08-02 17:23:59 +02:00 committed by GitHub
parent be77c2a718
commit e1e4fb8113
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,10 +7,10 @@
<head>
<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: 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>
html {
@ -162,7 +162,7 @@
// We disable caching during development so that we always view the latest version.
if ('serviceWorker' in navigator && window.location.hash !== "#dev") {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js');
navigator.serviceWorker.register('sw.js');
});
}