Skip to content

Commit

Permalink
Make paths in index.html relative (#68)
Browse files Browse the repository at this point in the history
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/`
  • Loading branch information
hoptimized committed Aug 2, 2022
1 parent be77c2a commit e1e4fb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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');
});
}

Expand Down

0 comments on commit e1e4fb8

Please sign in to comment.