Skip to content

Commit

Permalink
use public url
Browse files Browse the repository at this point in the history
  • Loading branch information
BlinkyStitt committed Apr 19, 2024
1 parent 5bc7240 commit d45fcf8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
# relatively as favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
# will obviously return error 404 not found.
# run: cd musical-leptos && ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
run: cd musical-leptos && ./trunk build --release --public-url "blinkystitt.github.com/musical-lights-rs"
run: echo "${GITHUB_REPOSITORY#*/}" && cd musical-leptos && ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"

# Deploy with Github Static Pages

Expand Down
31 changes: 18 additions & 13 deletions musical-leptos/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<!-- Add a plain CSS file: see https://trunkrs.dev/assets/#css -->
<!-- If using Tailwind with Leptos CSR, see https://trunkrs.dev/assets/#tailwind instead-->
<link data-trunk rel="css" rel="stylesheet" href="public/styles.css" />

<!-- Include favicon in dist output: see https://trunkrs.dev/assets/#icon -->
<link data-trunk rel="icon" href="public/favicon.ico" />

<!-- include support for `wasm-bindgen --weak-refs` - see: https://rustwasm.github.io/docs/wasm-bindgen/reference/weak-references.html -->
<link data-trunk rel="rust" data-wasm-opt="z" data-weak-refs />
</head>
<body></body>
</html>

<head>
<base data-trunk-public-url />

<!-- Add a plain CSS file: see https://trunkrs.dev/assets/#css -->
<!-- If using Tailwind with Leptos CSR, see https://trunkrs.dev/assets/#tailwind instead-->
<link data-trunk rel="css" rel="stylesheet" href="public/styles.css" />

<!-- Include favicon in dist output: see https://trunkrs.dev/assets/#icon -->
<link data-trunk rel="icon" href="public/favicon.ico" />

<!-- include support for `wasm-bindgen --weak-refs` - see: https://rustwasm.github.io/docs/wasm-bindgen/reference/weak-references.html -->
<link data-trunk rel="rust" data-wasm-opt="z" data-weak-refs />
</head>

<body></body>

</html>
2 changes: 2 additions & 0 deletions musical-leptos/src/pages/not_found.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ use leptos::*;
/// 404 Not Found Page
#[component]
pub fn NotFound() -> impl IntoView {
// TODO: console.log errors

view! { <h1>"Uh oh!" <br/> "We couldn't find that page!"</h1> }
}

0 comments on commit d45fcf8

Please sign in to comment.