Skip to content

Commit a548657

Browse files
committed
Change asset url to relative path
1 parent b1174dc commit a548657

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/github-pages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: Release to Github Pages
44
on:
55
push:
66
branches: [main, add-wasm-backend]
7+
paths:
8+
- 'examples/wasm/**'
79
workflow_dispatch:
810

911
permissions:

examples/wasm/game.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const GROUND_Y = canvas.height - CONFIG.GROUND_HEIGHT;
8383

8484
// Image loading
8585
const playerImage = new Image();
86-
playerImage.src = "/public/nyan_cat.gif";
86+
playerImage.src = "public/nyan_cat.gif";
8787

8888
class Player {
8989
constructor() {

examples/wasm/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@font-face {
44
font-family: 'PixelOperatorMonoRegular';
5-
src: url('/public/fonts/PixelOperatorMonoRegular.ttf') format('truetype');
5+
src: url('public/fonts/PixelOperatorMonoRegular.ttf') format('truetype');
66
font-weight: normal;
77
font-style: normal;
88
}

examples/wasm/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<meta property="og:image" content="https://rezigned.github.io/keymap-rs/preview.png" />
1010
<title>keymap-rs + WASM (Nyan Jump!)</title>
1111

12-
<link data-trunk rel="css" href="/index.css" />
13-
<link data-trunk rel="copy-dir" href="/public" />
12+
<link data-trunk rel="css" href="index.css" />
13+
<link data-trunk rel="copy-dir" href="public" />
1414

1515
<link rel="stylesheet" href="https://unpkg.com/@highlightjs/[email protected]/styles/tomorrow-night-blue.min.css">
1616
</head>

0 commit comments

Comments
 (0)