From 3a1fa4d4362660ed1e207a8de0fdab886f95f4d3 Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Sun, 2 Mar 2025 19:40:54 -0500 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A9=B9=20Seems=20like=20svelte=20does?= =?UTF-8?q?n't=20like=20it=20when=20I=20set=20ssr=20to=20false=20for=20the?= =?UTF-8?q?=20whole=20site.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- src/routes/+layout.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a38d746..4e6e08c 100644 --- a/package.json +++ b/package.json @@ -39,5 +39,6 @@ "type": "module", "dependencies": { "svelte-youtube-embed": "^0.3.0" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 488bdb1..37d7125 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -1,7 +1,6 @@ import { createKitDocsLoader } from '@svelteness/kit-docs' export const prerender = true -export const ssr = false export const load = createKitDocsLoader({ sidebar: { From bdd3043ef7b42368065dcc935182c6b91f24717c Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Sun, 2 Mar 2025 19:53:04 -0500 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=A7=20Fix=20PRs=20publishing=20the?= =?UTF-8?q?=20site...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9e07740..fc2ec1e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,6 +22,7 @@ jobs: cmd: build - name: Push to Build Branch + if: github.ref == 'refs/heads/main' uses: s0/git-publish-subdir-action@develop env: REPO: self From 073e377f79e4c8f0c72b20a3639f9379aa546199 Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Sun, 2 Mar 2025 19:53:27 -0500 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=90=9B=20Fix=20static=20choice=20for?= =?UTF-8?q?=20random=20quote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/404/+page.svelte | 32 +++--------------------------- src/routes/404/+page.ts | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 src/routes/404/+page.ts diff --git a/src/routes/404/+page.svelte b/src/routes/404/+page.svelte index d59c5a0..aba54a0 100644 --- a/src/routes/404/+page.svelte +++ b/src/routes/404/+page.svelte @@ -1,33 +1,7 @@
@@ -43,7 +17,7 @@

- {@html getRandomFlavorQuote()} + {@html flavorQuote} diff --git a/src/routes/404/+page.ts b/src/routes/404/+page.ts new file mode 100644 index 0000000..4747320 --- /dev/null +++ b/src/routes/404/+page.ts @@ -0,0 +1,39 @@ +import type { PageLoad } from './$types' + +export const ssr = false + +const flavorQuotes = [ + `Uh oh!`, + `Time to fire up the ol' debugger!`, + `Your item displays are sad 🥺`, + `Skill Issue.`, + `Should'a seen that one comming...`, + `Snaviewavie did an oopsie poopsie x3`, + `We to a little trolling.`, + `execute run execute run execute run execute run say This is fine.`, + `This is why we can't have nice things. :(`, + `Have you tried turning it off and on again?`, + `What if I put my command block next to yours? Haha just kidding... Unless?`, + `If at first you don't succeed, try, try again!`, + // We do a little trolling in binary. + `B:01010111 01100101 00100000 01100100 01101111 00100000 01100001 00100000 01101100 01101001 01110100 01110100 01101100 01100101 00100000 01110100 01110010 01101111 01101100 01101100 01101001 01101110 01100111`, + `I've decided to stop working for today. Try again tomorrow!`, + `Every time you see this error message, a developer vanishes in a puff of binary.`, + `"Flavor Text"? I've never tasted text before...`, + `( ͡° ͜ʖ ͡°) nice 404 page you got there.`, + `Some day you'll learn. But until then, I control the cheese.`, + `Please deposit 5 coins!`, + `Failed to find global 'pandemic'.`, + `I'm sorry, Dave. I'm afraid I can't do that.`, + `https://xkcd.com/221/` +] + +function getRandomFlavorQuote() { + return flavorQuotes[Math.floor(Math.random() * flavorQuotes.length)] +} + +export const load: PageLoad = () => { + return { + flavorQuote: getRandomFlavorQuote() + } +}