Skip to content

🩹 Seems like svelte doesn't like it when I set ssr to false for the whole site. #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@
"type": "module",
"dependencies": {
"svelte-youtube-embed": "^0.3.0"
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
1 change: 0 additions & 1 deletion src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createKitDocsLoader } from '@svelteness/kit-docs'

export const prerender = true
export const ssr = false

export const load = createKitDocsLoader({
sidebar: {
Expand Down
32 changes: 3 additions & 29 deletions src/routes/404/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,33 +1,7 @@
<script lang="ts">
export 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.`,
`<a href="https://xkcd.com/221/"><img src="https://imgs.xkcd.com/comics/random_number.png" alt="https://xkcd.com/221/"/></a>`
]
import { page } from '$app/stores'

function getRandomFlavorQuote() {
return flavorQuotes[Math.floor(Math.random() * flavorQuotes.length)]
}
const flavorQuote = $page.data.flavorQuote as string
</script>

<div class="page">
Expand All @@ -43,7 +17,7 @@
</p>
</div>
</div>
<q class="quote"><span>{@html getRandomFlavorQuote()}</span></q>
<q class="quote"><span>{@html flavorQuote}</span></q>
</div>
</div>

Expand Down
39 changes: 39 additions & 0 deletions src/routes/404/+page.ts
Original file line number Diff line number Diff line change
@@ -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.`,
`<a href="https://xkcd.com/221/"><img src="https://imgs.xkcd.com/comics/random_number.png" alt="https://xkcd.com/221/"/></a>`
]

function getRandomFlavorQuote() {
return flavorQuotes[Math.floor(Math.random() * flavorQuotes.length)]
}

export const load: PageLoad = () => {
return {
flavorQuote: getRandomFlavorQuote()
}
}