Skip to content

Commit ddb3a0c

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

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

.github/workflows/github-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: Release to Github Pages
33

44
on:
55
push:
6-
branches: [main, add-wasm-backend]
6+
branches: [main]
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>

keymap_derive/src/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub(crate) struct Item<'a> {
1515
pub description: String,
1616
}
1717

18-
pub(crate) fn parse_items(variants: &Punctuated<Variant, Comma>) -> Result<Vec<Item>, syn::Error> {
18+
pub(crate) fn parse_items(variants: &Punctuated<Variant, Comma>) -> Result<Vec<Item<'_>>, syn::Error> {
1919
// NOTE: All variants are parsed, even those without the #[key(...)] attribute.
2020
// This allows the deserializer to override keys and descriptions for variants that don't define them explicitly.
2121
variants

0 commit comments

Comments
 (0)