diff --git a/README.md b/README.md index 2d9e32bd..1280863b 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ The following environment variables can be set to override the default settings: | ------------------------------- | ------------------- | -------------------------------------- | | PUBLIC_INSTANCE_URL | URL | `lemmy.ml` | | PUBLIC_LOCK_TO_INSTANCE | `bool` | `true` if `PUBLIC_INSTANCE_URL` is set | +| PUBLIC_SSR_ENABLED | `bool` | `false` | | PUBLIC_THEME | system\|dark\|light | system | | PUBLIC_EXPANDABLE_IMAGES | `bool` | true | | PUBLIC_MARK_READ_POSTS | `bool` | true | diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 71d2b61c..b6631bcd 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -1 +1,3 @@ -export let ssr = false +import { env } from '$env/dynamic/public' + +export let ssr = (env.PUBLIC_SSR_ENABLED?.toLowerCase() ?? 'false') == 'true'