diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..d61a814
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,50 @@
+name: Deploy to GitHub Pages
+
+on:
+ push:
+ branches: [main]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+concurrency:
+ group: pages
+ cancel-in-progress: false
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: npm
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Build
+ run: npm run build
+
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v3
+ with:
+ path: build
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4
diff --git a/README.md b/README.md
index c863b3b..093768f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# Fluid Language
+[Visit the blog](https://jhwheeler.github.io/fluid_language/)
+
My personal blog, built with [Svelte](https://svelte.dev), [SvelteKit](https://kit.svelte.dev) and [MDsveX](https://mdsvex.com).
In this multi-lingual blog, I write about various topics, including philosophy, linguistics, and spirituality.
diff --git a/package-lock.json b/package-lock.json
index d07a132..0372414 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.1.0",
"license": "MIT",
"devDependencies": {
- "@sveltejs/adapter-auto": "^3.0.0",
+ "@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.0",
@@ -933,14 +933,12 @@
"integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
"dev": true
},
- "node_modules/@sveltejs/adapter-auto": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-3.2.1.tgz",
- "integrity": "sha512-/3xx8ZFCD5UBc/7AbyXkFF3HNCzWAp2xncH8HA4doGjoGQEN7PmwiRx4Y9nOzi4mqDqYYUic0gaIAE2khWWU4Q==",
+ "node_modules/@sveltejs/adapter-static": {
+ "version": "3.0.10",
+ "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.10.tgz",
+ "integrity": "sha512-7D9lYFWJmB7zxZyTE/qxjksvMqzMuYrrsyh1f4AlZqeZeACPRySjbC3aFiY55wb1tWUaKOQG9PVbm74JcN2Iew==",
"dev": true,
- "dependencies": {
- "import-meta-resolve": "^4.1.0"
- },
+ "license": "MIT",
"peerDependencies": {
"@sveltejs/kit": "^2.0.0"
}
diff --git a/package.json b/package.json
index 9c1a8ac..b69d6ea 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
"format": "prettier --write ."
},
"devDependencies": {
- "@sveltejs/adapter-auto": "^3.0.0",
+ "@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.0",
diff --git a/src/lib/components/ArticleMeta.svelte b/src/lib/components/ArticleMeta.svelte
index 8f43223..1228869 100644
--- a/src/lib/components/ArticleMeta.svelte
+++ b/src/lib/components/ArticleMeta.svelte
@@ -1,4 +1,5 @@
-
+
diff --git a/src/posts/a-new-voice.md b/src/posts/a-new-voice.md
index 1aead0b..d5b013b 100644
--- a/src/posts/a-new-voice.md
+++ b/src/posts/a-new-voice.md
@@ -21,4 +21,4 @@ I carry with me a deepening of my ability to integrate ideas and traditions toge
I call in discipline to keep me focused and consistent in my creativity. I call in a teaching role in my community, sharing the wisdom and knowledge God has given me. I call in overflowing creativity to share with others. I call in the true expression of my voice as a vehicle for the Divine.
-These reflections inspired a poem: [Open Voice](/posts/open-voice).
+These reflections inspired a poem: [Open Voice](./open-voice).
diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts
new file mode 100644
index 0000000..189f71e
--- /dev/null
+++ b/src/routes/+layout.ts
@@ -0,0 +1 @@
+export const prerender = true;
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 98eb504..b9bc371 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -2,30 +2,32 @@
import ArticlePreview from '$lib/components/ArticlePreview.svelte';
import { hasSeenIndexPageAnimations } from '$lib/stores';
import { page } from '$app/stores';
+ import { browser } from '$app/environment';
import { onMount } from 'svelte';
export let data;
- let showAnimations: boolean | null = null;
+ let mounted = !browser;
+ let showAnimations = false;
- $: tag = $page.url.searchParams.get('tag');
+ $: tag = browser ? $page.url.searchParams.get('tag') : null;
$: filteredPosts =
tag && data?.posts?.length
? data?.posts?.filter((p) => p.tags.includes(tag))
: data?.posts || [];
onMount(() => {
- // Hide animations if the user has seen them already or has set the `hideAnimations` query param to true
showAnimations =
!$hasSeenIndexPageAnimations && $page.url.searchParams.get('hideAnimations') !== 'true';
hasSeenIndexPageAnimations.set(true);
+ mounted = true;
});
- {#if showAnimations !== null}
+ {#if mounted}
Fluid Language
diff --git a/src/routes/posts/[slug]/+page.svelte b/src/routes/posts/[slug]/+page.svelte
index 48f898a..a9447c0 100644
--- a/src/routes/posts/[slug]/+page.svelte
+++ b/src/routes/posts/[slug]/+page.svelte
@@ -1,4 +1,5 @@