feat: integrate pagefind for improved site search and update build scripts

This commit is contained in:
swve
2026-03-14 17:14:01 +01:00
parent c522cac63f
commit 1d4924cb85
9 changed files with 227 additions and 22 deletions

5
.gitignore vendored
View File

@@ -15,7 +15,10 @@
# next-sitemap
/public/robots.txt
/public/sitemap.xml
/public/sitemap-0.xml
/public/sitemap-0.xml
# pagefind (generated at build time)
/public/_pagefind
# production
/build

View File

@@ -20,6 +20,7 @@
"@tailwindcss/postcss": "^4.2.1",
"@types/node": "25.5.0",
"@types/react": "19.2.14",
"pagefind": "^1.4.0",
"tailwindcss": "^4.2.1",
"typescript": "5.9.3",
},
@@ -204,6 +205,18 @@
"@opentelemetry/semantic-conventions": ["@opentelemetry/semantic-conventions@1.40.0", "", {}, "sha512-cifvXDhcqMwwTlTK04GBNeIe7yyo28Mfby85QXFe1Yk8nmi36Ab/5UQwptOx84SsoGNRg+EVSjwzfSZMy6pmlw=="],
"@pagefind/darwin-arm64": ["@pagefind/darwin-arm64@1.4.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-2vMqkbv3lbx1Awea90gTaBsvpzgRs7MuSgKDxW0m9oV1GPZCZbZBJg/qL83GIUEN2BFlY46dtUZi54pwH+/pTQ=="],
"@pagefind/darwin-x64": ["@pagefind/darwin-x64@1.4.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-e7JPIS6L9/cJfow+/IAqknsGqEPjJnVXGjpGm25bnq+NPdoD3c/7fAwr1OXkG4Ocjx6ZGSCijXEV4ryMcH2E3A=="],
"@pagefind/freebsd-x64": ["@pagefind/freebsd-x64@1.4.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-WcJVypXSZ+9HpiqZjFXMUobfFfZZ6NzIYtkhQ9eOhZrQpeY5uQFqNWLCk7w9RkMUwBv1HAMDW3YJQl/8OqsV0Q=="],
"@pagefind/linux-arm64": ["@pagefind/linux-arm64@1.4.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-PIt8dkqt4W06KGmQjONw7EZbhDF+uXI7i0XtRLN1vjCUxM9vGPdtJc2mUyVPevjomrGz5M86M8bqTr6cgDp1Uw=="],
"@pagefind/linux-x64": ["@pagefind/linux-x64@1.4.0", "", { "os": "linux", "cpu": "x64" }, "sha512-z4oddcWwQ0UHrTHR8psLnVlz6USGJ/eOlDPTDYZ4cI8TK8PgwRUPQZp9D2iJPNIPcS6Qx/E4TebjuGJOyK8Mmg=="],
"@pagefind/windows-x64": ["@pagefind/windows-x64@1.4.0", "", { "os": "win32", "cpu": "x64" }, "sha512-NkT+YAdgS2FPCn8mIA9bQhiBs+xmniMGq1LFPDhcFn0+2yIUEiIG06t7bsZlhdjknEQRTSdT7YitP6fC5qwP0g=="],
"@phosphor-icons/react": ["@phosphor-icons/react@2.1.10", "", { "peerDependencies": { "react": ">= 16.8", "react-dom": ">= 16.8" } }, "sha512-vt8Tvq8GLjheAZZYa+YG/pW7HDbov8El/MANW8pOAz4eGxrwhnbfrQZq0Cp4q8zBEu8NIhHdnr+r8thnfRSNYA=="],
"@posthog/core": ["@posthog/core@1.23.4", "", { "dependencies": { "cross-spawn": "^7.0.6" } }, "sha512-gSM1gnIuw5UOBUOTz0IhCTH8jOHoFr5rzSDb5m7fn9ofLHvz3boZT1L1f+bcuk+mvzNJfrJ3ByVQGKmUQnKQ8g=="],
@@ -896,6 +909,8 @@
"package-manager-detector": ["package-manager-detector@1.6.0", "", {}, "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA=="],
"pagefind": ["pagefind@1.4.0", "", { "optionalDependencies": { "@pagefind/darwin-arm64": "1.4.0", "@pagefind/darwin-x64": "1.4.0", "@pagefind/freebsd-x64": "1.4.0", "@pagefind/linux-arm64": "1.4.0", "@pagefind/linux-x64": "1.4.0", "@pagefind/windows-x64": "1.4.0" }, "bin": { "pagefind": "lib/runner/bin.cjs" } }, "sha512-z2kY1mQlL4J8q5EIsQkLzQjilovKzfNVhX8De6oyE6uHpfFtyBaqUpcl/XzJC/4fjD8vBDyh1zolimIcVrCn9g=="],
"parse-entities": ["parse-entities@4.0.2", "", { "dependencies": { "@types/unist": "2.0.11", "character-entities-legacy": "3.0.0", "character-reference-invalid": "2.0.1", "decode-named-character-reference": "1.2.0", "is-alphanumerical": "2.0.1", "is-decimal": "2.0.1", "is-hexadecimal": "2.0.1" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="],
"parse-latin": ["parse-latin@7.0.0", "", { "dependencies": { "@types/nlcst": "2.0.3", "@types/unist": "3.0.3", "nlcst-to-string": "4.0.0", "unist-util-modify-children": "4.0.0", "unist-util-visit-children": "3.0.0", "vfile": "6.0.3" } }, "sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ=="],

View File

@@ -1,6 +1,6 @@
{
"index": "Overview",
"sso": "Single Sign-On",
"sso": "SSO",
"audit-logs": "Audit Logs",
"scorm": "SCORM"
}

View File

@@ -1,3 +1,5 @@
{
"index": "Overview"
"index": "Overview",
"workos": "WorkOS",
"custom-oidc": "Custom OIDC"
}

View File

@@ -0,0 +1,48 @@
import { Callout } from 'nextra/components'
# Custom OIDC
The Custom OIDC provider lets you connect LearnHouse directly to any OpenID Connect 1.0 compatible identity provider. This is ideal for organizations that want to use their existing IdP without going through a third-party broker.
## Compatible Providers
Any OIDC-compliant provider works, including:
- **Azure AD / Microsoft Entra ID**
- **Okta**
- **Google Workspace**
- **Keycloak**
- **Auth0**
- **OneLogin**
- **Ping Identity**
## Configuration
| Field | Required | Description |
|---|---|---|
| `issuer_url` | Yes | The OIDC Issuer URL. LearnHouse uses this to auto-discover endpoints via `/.well-known/openid-configuration`. |
| `client_id` | Yes | OAuth 2.0 Client ID from your identity provider. |
| `client_secret` | Yes | OAuth 2.0 Client Secret from your identity provider. |
| `scopes` | No | Space-separated OAuth scopes. Defaults to `openid email profile`. |
## Issuer URL Examples
| Provider | Issuer URL Format |
|---|---|
| Azure AD | `https://login.microsoftonline.com/{tenant-id}/v2.0` |
| Okta | `https://{your-domain}.okta.com` |
| Google Workspace | `https://accounts.google.com` |
| Keycloak | `https://{host}/realms/{realm}` |
| Auth0 | `https://{your-domain}.auth0.com` |
## Setup Steps
1. Register LearnHouse as an application in your identity provider and obtain a Client ID and Client Secret.
2. Set the callback/redirect URI in your IdP to your LearnHouse SSO callback URL.
3. In the organization settings, select **Custom OIDC** as the SSO provider.
4. Enter the Issuer URL, Client ID, and Client Secret.
5. Users with matching email domains can now log in via SSO.
<Callout type="info">
LearnHouse uses OIDC Discovery to automatically find the authorization, token, and userinfo endpoints from the issuer URL. Make sure your IdP exposes a `/.well-known/openid-configuration` document.
</Callout>

View File

@@ -10,12 +10,14 @@ SSO requires an Enterprise plan.
## Supported Providers
- **WorkOS** — Full implementation with admin portal support.
- **Okta** — OIDC-based authentication.
- **Auth0** — OIDC-based authentication.
- **Keycloak** — Self-hosted identity provider support.
- **Custom SAML** — Connect any SAML-compatible identity provider.
- **Custom OIDC** — Connect any OIDC-compatible identity provider.
| Provider | Status | Description |
|---|---|---|
| [WorkOS](/enterprise/sso/workos) | Available | Enterprise SSO with SAML and OIDC support, includes admin portal |
| [Custom OIDC](/enterprise/sso/custom-oidc) | Available | Connect any OpenID Connect provider (Azure AD, Okta, Google Workspace, Keycloak, etc.) |
<Callout type="info">
The Custom OIDC provider lets you connect to virtually any modern identity provider that supports OpenID Connect, including Okta, Azure AD / Microsoft Entra ID, Google Workspace, and Keycloak.
</Callout>
## How SSO Works
@@ -26,7 +28,7 @@ SSO requires an Enterprise plan.
## User Provisioning
When a user logs in via SSO for the first time, LearnHouse can automatically create their account using profile data from the identity provider:
When a user logs in via SSO for the first time, LearnHouse automatically creates their account using profile data from the identity provider:
- **First name, last name, and email** are mapped from the IdP.
- **Avatar** is imported if available.
@@ -38,8 +40,8 @@ Existing users whose email matches are linked automatically — no duplicate acc
| Option | Description |
|---|---|
| Provider | Which identity provider to use. |
| Provider | Which identity provider to use (WorkOS or Custom OIDC). |
| Email domain | Restrict SSO to specific email domains. |
| Auto-provisioning | Automatically create accounts for new SSO users. |
| Default role | Role assigned to newly provisioned users. |
| Admin portal | Some providers (like WorkOS) offer an admin portal for managing the connection directly. |
| Admin portal | WorkOS offers an admin portal for managing the IdP connection directly. |

View File

@@ -0,0 +1,41 @@
import { Callout } from 'nextra/components'
# WorkOS
WorkOS provides enterprise SSO through a unified API that supports both SAML and OIDC identity providers. It includes an admin portal that lets organization admins configure their identity provider without developer involvement.
<Callout>
Requires `WORKOS_API_KEY` and `WORKOS_CLIENT_ID` environment variables to be set.
</Callout>
## Features
- **Admin Portal** — WorkOS provides a hosted portal where organization admins can set up and manage their IdP connection directly.
- **SAML & OIDC** — Supports both protocols through a single integration.
- **Auto User Provisioning** — Automatically creates LearnHouse accounts from IdP profiles.
- **Domain Restrictions** — Restrict access to specific email domains.
- **Default Role Assignment** — Assign a default role to newly provisioned users.
## Configuration
| Field | Required | Description |
|---|---|---|
| `organization_id` | Yes (or `connection_id`) | WorkOS Organization ID, created automatically or via the Admin Portal. |
| `connection_id` | Yes (or `organization_id`) | WorkOS Connection ID, typically managed via the Admin Portal. |
You need either an `organization_id` (for organization-level SSO) or a `connection_id` (for a specific connection). In most cases, you'll use the `organization_id` and let admins configure the connection through the Admin Portal.
## Environment Variables
| Variable | Description |
|---|---|
| `WORKOS_API_KEY` | Your WorkOS API key. |
| `WORKOS_CLIENT_ID` | Your WorkOS Client ID. |
## Setup Steps
1. Create a [WorkOS account](https://workos.com) and obtain your API key and Client ID.
2. Set the `WORKOS_API_KEY` and `WORKOS_CLIENT_ID` environment variables in your LearnHouse deployment.
3. In the organization settings, select **WorkOS** as the SSO provider.
4. Use the Admin Portal link to configure the identity provider connection (SAML or OIDC).
5. Users with matching email domains can now log in via SSO.

View File

@@ -4,7 +4,7 @@
"scripts": {
"dev": "next dev",
"build": "node scripts/generate-llms-full.mjs && next build",
"postbuild": "next-sitemap",
"postbuild": "pagefind --site .next/server/app --output-path public/_pagefind && next-sitemap",
"start": "next start",
"lint": "next lint"
},
@@ -25,6 +25,7 @@
"@tailwindcss/postcss": "^4.2.1",
"@types/node": "25.5.0",
"@types/react": "19.2.14",
"pagefind": "^1.4.0",
"tailwindcss": "^4.2.1",
"typescript": "5.9.3"
}

View File

@@ -8,6 +8,10 @@
# Untitled
URL: https://docs.learnhouse.app
---
title: Home
---
## Platform Features
## Tech Stack
@@ -1427,12 +1431,12 @@ SSO requires an Enterprise plan.
## Supported Providers
- **WorkOS** — Full implementation with admin portal support.
- **Okta** — OIDC-based authentication.
- **Auth0** — OIDC-based authentication.
- **Keycloak** — Self-hosted identity provider support.
- **Custom SAML** — Connect any SAML-compatible identity provider.
- **Custom OIDC** — Connect any OIDC-compatible identity provider.
| Provider | Status | Description |
|---|---|---|
| [WorkOS](/enterprise/sso/workos) | Available | Enterprise SSO with SAML and OIDC support, includes admin portal |
| [Custom OIDC](/enterprise/sso/custom-oidc) | Available | Connect any OpenID Connect provider (Azure AD, Okta, Google Workspace, Keycloak, etc.) |
The Custom OIDC provider lets you connect to virtually any modern identity provider that supports OpenID Connect, including Okta, Azure AD / Microsoft Entra ID, Google Workspace, and Keycloak.
## How SSO Works
@@ -1443,7 +1447,7 @@ SSO requires an Enterprise plan.
## User Provisioning
When a user logs in via SSO for the first time, LearnHouse can automatically create their account using profile data from the identity provider:
When a user logs in via SSO for the first time, LearnHouse automatically creates their account using profile data from the identity provider:
- **First name, last name, and email** are mapped from the IdP.
- **Avatar** is imported if available.
@@ -1455,11 +1459,100 @@ Existing users whose email matches are linked automatically — no duplicate acc
| Option | Description |
|---|---|
| Provider | Which identity provider to use. |
| Provider | Which identity provider to use (WorkOS or Custom OIDC). |
| Email domain | Restrict SSO to specific email domains. |
| Auto-provisioning | Automatically create accounts for new SSO users. |
| Default role | Role assigned to newly provisioned users. |
| Admin portal | Some providers (like WorkOS) offer an admin portal for managing the connection directly. |
| Admin portal | WorkOS offers an admin portal for managing the IdP connection directly. |
---
# Custom OIDC
URL: https://docs.learnhouse.app/enterprise/sso/custom-oidc
The Custom OIDC provider lets you connect LearnHouse directly to any OpenID Connect 1.0 compatible identity provider. This is ideal for organizations that want to use their existing IdP without going through a third-party broker.
## Compatible Providers
Any OIDC-compliant provider works, including:
- **Azure AD / Microsoft Entra ID**
- **Okta**
- **Google Workspace**
- **Keycloak**
- **Auth0**
- **OneLogin**
- **Ping Identity**
## Configuration
| Field | Required | Description |
|---|---|---|
| `issuer_url` | Yes | The OIDC Issuer URL. LearnHouse uses this to auto-discover endpoints via `/.well-known/openid-configuration`. |
| `client_id` | Yes | OAuth 2.0 Client ID from your identity provider. |
| `client_secret` | Yes | OAuth 2.0 Client Secret from your identity provider. |
| `scopes` | No | Space-separated OAuth scopes. Defaults to `openid email profile`. |
## Issuer URL Examples
| Provider | Issuer URL Format |
|---|---|
| Azure AD | `https://login.microsoftonline.com/{tenant-id}/v2.0` |
| Okta | `https://{your-domain}.okta.com` |
| Google Workspace | `https://accounts.google.com` |
| Keycloak | `https://{host}/realms/{realm}` |
| Auth0 | `https://{your-domain}.auth0.com` |
## Setup Steps
1. Register LearnHouse as an application in your identity provider and obtain a Client ID and Client Secret.
2. Set the callback/redirect URI in your IdP to your LearnHouse SSO callback URL.
3. In the organization settings, select **Custom OIDC** as the SSO provider.
4. Enter the Issuer URL, Client ID, and Client Secret.
5. Users with matching email domains can now log in via SSO.
LearnHouse uses OIDC Discovery to automatically find the authorization, token, and userinfo endpoints from the issuer URL. Make sure your IdP exposes a `/.well-known/openid-configuration` document.
---
# WorkOS
URL: https://docs.learnhouse.app/enterprise/sso/workos
WorkOS provides enterprise SSO through a unified API that supports both SAML and OIDC identity providers. It includes an admin portal that lets organization admins configure their identity provider without developer involvement.
Requires `WORKOS_API_KEY` and `WORKOS_CLIENT_ID` environment variables to be set.
## Features
- **Admin Portal** — WorkOS provides a hosted portal where organization admins can set up and manage their IdP connection directly.
- **SAML & OIDC** — Supports both protocols through a single integration.
- **Auto User Provisioning** — Automatically creates LearnHouse accounts from IdP profiles.
- **Domain Restrictions** — Restrict access to specific email domains.
- **Default Role Assignment** — Assign a default role to newly provisioned users.
## Configuration
| Field | Required | Description |
|---|---|---|
| `organization_id` | Yes (or `connection_id`) | WorkOS Organization ID, created automatically or via the Admin Portal. |
| `connection_id` | Yes (or `organization_id`) | WorkOS Connection ID, typically managed via the Admin Portal. |
You need either an `organization_id` (for organization-level SSO) or a `connection_id` (for a specific connection). In most cases, you'll use the `organization_id` and let admins configure the connection through the Admin Portal.
## Environment Variables
| Variable | Description |
|---|---|
| `WORKOS_API_KEY` | Your WorkOS API key. |
| `WORKOS_CLIENT_ID` | Your WorkOS Client ID. |
## Setup Steps
1. Create a [WorkOS account](https://workos.com) and obtain your API key and Client ID.
2. Set the `WORKOS_API_KEY` and `WORKOS_CLIENT_ID` environment variables in your LearnHouse deployment.
3. In the organization settings, select **WorkOS** as the SSO provider.
4. Use the Admin Portal link to configure the identity provider connection (SAML or OIDC).
5. Users with matching email domains can now log in via SSO.
---