diff --git a/.github/workflows/v3-docs.yaml b/.github/workflows/v3-docs.yaml index 726c3e610..a29980379 100644 --- a/.github/workflows/v3-docs.yaml +++ b/.github/workflows/v3-docs.yaml @@ -18,14 +18,15 @@ jobs: with: node-version: 20.5.1 registry-url: https://registry.npmjs.org - - name: install dependencies + - name: install malta + working-directory: docs run: | - npm i -g pnpm - pnpm i --no-frozen-lockfile + curl -o malta.tgz -L https://github.com/pilcrowonpaper/malta/releases/latest/download/linux-amd64.tgz + tar -xvzf malta.tgz + - name: build + working-directory: docs + run: ./linux-amd64/malta - name: install wrangler run: npm i -g wrangler - - name: build - working-directory: documentation - run: pnpm build - name: deploy - run: wrangler pages deploy documentation/dist --project-name lucia-v3 --branch main + run: wrangler pages deploy docs/dist --project-name malta-cli --branch main diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..4582bd3e7 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +dist +.DS_Store \ No newline at end of file diff --git a/docs/malta.config.json b/docs/malta.config.json new file mode 100644 index 000000000..6d7f6c3b9 --- /dev/null +++ b/docs/malta.config.json @@ -0,0 +1,55 @@ +{ + "name": "Lucia", + "description": "Lucia is an open source auth library that abstracts away the complexity of handling sessions.", + "domain": "https://v3.lucia-auth.com", + "twitter": "@lucia_auth", + "sidebar": [ + { + "title": "Start here", + "pages": [ + ["Getting-started", "/getting-started"], + ["Database", "/database"], + ["Upgrade to v3", "/upgrade-v3"] + ] + }, + { + "title": "Tutorials", + "pages": [ + ["GitHub OAuth", "/tutorials/github-oauth"], + ["Username and password", "/tutorials/username-and-password"] + ] + }, + { + "title": "Basics", + "pages": [ + ["Sessions", "/basics/sessions"], + ["Users", "/basics/users"], + ["Configuration", "/basics/configuration"], + ["Troubleshooting", "/basics/help"] + ] + }, + { + "title": "Guides", + "pages": [ + ["Validate session cookies", "/guides/validate-session-cookies"], + ["Validate bearer tokens", "/guides/validate-bearer-tokens"], + ["OAuth", "/guides/oauth"], + ["Email and password", "/guides/email-and-password"], + ["Passkeys", "/guides/passkeys"], + ["Improving sessions", "/guides/improving-sessions"] + ] + }, + { + "title": "API reference", + "pages": [["lucia", "/reference/main", "code"]] + }, + { + "title": "Community", + "pages": [ + ["Discord", "https://discord.com/invite/PwrK3kpVR3"], + ["GitHub", "https://github.com/lucia-auth/lucia"], + ["Twitter", "https://twitter.com/lucia-auth"] + ] + } + ] +} diff --git a/documentation/src/pages/basics/configuration.md b/docs/pages/basics/configuration.md similarity index 100% rename from documentation/src/pages/basics/configuration.md rename to docs/pages/basics/configuration.md diff --git a/documentation/src/pages/basics/help.md b/docs/pages/basics/help.md similarity index 100% rename from documentation/src/pages/basics/help.md rename to docs/pages/basics/help.md diff --git a/documentation/src/pages/basics/sessions.md b/docs/pages/basics/sessions.md similarity index 100% rename from documentation/src/pages/basics/sessions.md rename to docs/pages/basics/sessions.md diff --git a/documentation/src/pages/basics/users.md b/docs/pages/basics/users.md similarity index 100% rename from documentation/src/pages/basics/users.md rename to docs/pages/basics/users.md diff --git a/documentation/src/pages/database/drizzle.md b/docs/pages/database/drizzle.md similarity index 100% rename from documentation/src/pages/database/drizzle.md rename to docs/pages/database/drizzle.md diff --git a/documentation/src/pages/database/index.md b/docs/pages/database/index.md similarity index 100% rename from documentation/src/pages/database/index.md rename to docs/pages/database/index.md diff --git a/documentation/src/pages/database/kysely.md b/docs/pages/database/kysely.md similarity index 100% rename from documentation/src/pages/database/kysely.md rename to docs/pages/database/kysely.md diff --git a/documentation/src/pages/database/mongodb.md b/docs/pages/database/mongodb.md similarity index 100% rename from documentation/src/pages/database/mongodb.md rename to docs/pages/database/mongodb.md diff --git a/documentation/src/pages/database/mongoose.md b/docs/pages/database/mongoose.md similarity index 100% rename from documentation/src/pages/database/mongoose.md rename to docs/pages/database/mongoose.md diff --git a/documentation/src/pages/database/mysql.md b/docs/pages/database/mysql.md similarity index 100% rename from documentation/src/pages/database/mysql.md rename to docs/pages/database/mysql.md diff --git a/documentation/src/pages/database/postgresql.md b/docs/pages/database/postgresql.md similarity index 100% rename from documentation/src/pages/database/postgresql.md rename to docs/pages/database/postgresql.md diff --git a/documentation/src/pages/database/prisma.md b/docs/pages/database/prisma.md similarity index 100% rename from documentation/src/pages/database/prisma.md rename to docs/pages/database/prisma.md diff --git a/documentation/src/pages/database/sqlite.md b/docs/pages/database/sqlite.md similarity index 100% rename from documentation/src/pages/database/sqlite.md rename to docs/pages/database/sqlite.md diff --git a/documentation/src/pages/getting-started/astro.md b/docs/pages/getting-started/astro.md similarity index 100% rename from documentation/src/pages/getting-started/astro.md rename to docs/pages/getting-started/astro.md diff --git a/documentation/src/pages/getting-started/index.md b/docs/pages/getting-started/index.md similarity index 100% rename from documentation/src/pages/getting-started/index.md rename to docs/pages/getting-started/index.md diff --git a/documentation/src/pages/getting-started/nextjs-app.md b/docs/pages/getting-started/nextjs-app.md similarity index 100% rename from documentation/src/pages/getting-started/nextjs-app.md rename to docs/pages/getting-started/nextjs-app.md diff --git a/documentation/src/pages/getting-started/nextjs-pages.md b/docs/pages/getting-started/nextjs-pages.md similarity index 100% rename from documentation/src/pages/getting-started/nextjs-pages.md rename to docs/pages/getting-started/nextjs-pages.md diff --git a/documentation/src/pages/getting-started/nuxt.md b/docs/pages/getting-started/nuxt.md similarity index 100% rename from documentation/src/pages/getting-started/nuxt.md rename to docs/pages/getting-started/nuxt.md diff --git a/documentation/src/pages/getting-started/sveltekit.md b/docs/pages/getting-started/sveltekit.md similarity index 100% rename from documentation/src/pages/getting-started/sveltekit.md rename to docs/pages/getting-started/sveltekit.md diff --git a/documentation/src/pages/guides/email-and-password/2fa.md b/docs/pages/guides/email-and-password/2fa.md similarity index 100% rename from documentation/src/pages/guides/email-and-password/2fa.md rename to docs/pages/guides/email-and-password/2fa.md diff --git a/documentation/src/pages/guides/email-and-password/basics.md b/docs/pages/guides/email-and-password/basics.md similarity index 100% rename from documentation/src/pages/guides/email-and-password/basics.md rename to docs/pages/guides/email-and-password/basics.md diff --git a/documentation/src/pages/guides/email-and-password/email-verification-links.md b/docs/pages/guides/email-and-password/email-verification-links.md similarity index 100% rename from documentation/src/pages/guides/email-and-password/email-verification-links.md rename to docs/pages/guides/email-and-password/email-verification-links.md diff --git a/documentation/src/pages/guides/email-and-password/email-verification.md b/docs/pages/guides/email-and-password/email-verification.md similarity index 100% rename from documentation/src/pages/guides/email-and-password/email-verification.md rename to docs/pages/guides/email-and-password/email-verification.md diff --git a/documentation/src/pages/guides/email-and-password/index.md b/docs/pages/guides/email-and-password/index.md similarity index 100% rename from documentation/src/pages/guides/email-and-password/index.md rename to docs/pages/guides/email-and-password/index.md diff --git a/documentation/src/pages/guides/email-and-password/login-throttling.md b/docs/pages/guides/email-and-password/login-throttling.md similarity index 100% rename from documentation/src/pages/guides/email-and-password/login-throttling.md rename to docs/pages/guides/email-and-password/login-throttling.md diff --git a/documentation/src/pages/guides/email-and-password/password-reset.md b/docs/pages/guides/email-and-password/password-reset.md similarity index 100% rename from documentation/src/pages/guides/email-and-password/password-reset.md rename to docs/pages/guides/email-and-password/password-reset.md diff --git a/documentation/src/pages/guides/improving-sessions.md b/docs/pages/guides/improving-sessions.md similarity index 100% rename from documentation/src/pages/guides/improving-sessions.md rename to docs/pages/guides/improving-sessions.md diff --git a/documentation/src/pages/guides/oauth/account-linking.md b/docs/pages/guides/oauth/account-linking.md similarity index 100% rename from documentation/src/pages/guides/oauth/account-linking.md rename to docs/pages/guides/oauth/account-linking.md diff --git a/documentation/src/pages/guides/oauth/basics.md b/docs/pages/guides/oauth/basics.md similarity index 100% rename from documentation/src/pages/guides/oauth/basics.md rename to docs/pages/guides/oauth/basics.md diff --git a/documentation/src/pages/guides/oauth/custom-providers.md b/docs/pages/guides/oauth/custom-providers.md similarity index 100% rename from documentation/src/pages/guides/oauth/custom-providers.md rename to docs/pages/guides/oauth/custom-providers.md diff --git a/documentation/src/pages/guides/oauth/index.md b/docs/pages/guides/oauth/index.md similarity index 100% rename from documentation/src/pages/guides/oauth/index.md rename to docs/pages/guides/oauth/index.md diff --git a/documentation/src/pages/guides/oauth/multiple-providers.md b/docs/pages/guides/oauth/multiple-providers.md similarity index 100% rename from documentation/src/pages/guides/oauth/multiple-providers.md rename to docs/pages/guides/oauth/multiple-providers.md diff --git a/documentation/src/pages/guides/oauth/pkce.md b/docs/pages/guides/oauth/pkce.md similarity index 100% rename from documentation/src/pages/guides/oauth/pkce.md rename to docs/pages/guides/oauth/pkce.md diff --git a/documentation/src/pages/guides/passkeys.md b/docs/pages/guides/passkeys.md similarity index 100% rename from documentation/src/pages/guides/passkeys.md rename to docs/pages/guides/passkeys.md diff --git a/documentation/src/pages/guides/validate-bearer-tokens.md b/docs/pages/guides/validate-bearer-tokens.md similarity index 100% rename from documentation/src/pages/guides/validate-bearer-tokens.md rename to docs/pages/guides/validate-bearer-tokens.md diff --git a/documentation/src/pages/guides/validate-session-cookies/astro.md b/docs/pages/guides/validate-session-cookies/astro.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/astro.md rename to docs/pages/guides/validate-session-cookies/astro.md diff --git a/documentation/src/pages/guides/validate-session-cookies/elysia.md b/docs/pages/guides/validate-session-cookies/elysia.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/elysia.md rename to docs/pages/guides/validate-session-cookies/elysia.md diff --git a/documentation/src/pages/guides/validate-session-cookies/express.md b/docs/pages/guides/validate-session-cookies/express.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/express.md rename to docs/pages/guides/validate-session-cookies/express.md diff --git a/documentation/src/pages/guides/validate-session-cookies/hono.md b/docs/pages/guides/validate-session-cookies/hono.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/hono.md rename to docs/pages/guides/validate-session-cookies/hono.md diff --git a/documentation/src/pages/guides/validate-session-cookies/index.md b/docs/pages/guides/validate-session-cookies/index.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/index.md rename to docs/pages/guides/validate-session-cookies/index.md diff --git a/documentation/src/pages/guides/validate-session-cookies/nextjs-app.md b/docs/pages/guides/validate-session-cookies/nextjs-app.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/nextjs-app.md rename to docs/pages/guides/validate-session-cookies/nextjs-app.md diff --git a/documentation/src/pages/guides/validate-session-cookies/nextjs-pages.md b/docs/pages/guides/validate-session-cookies/nextjs-pages.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/nextjs-pages.md rename to docs/pages/guides/validate-session-cookies/nextjs-pages.md diff --git a/documentation/src/pages/guides/validate-session-cookies/nuxt.md b/docs/pages/guides/validate-session-cookies/nuxt.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/nuxt.md rename to docs/pages/guides/validate-session-cookies/nuxt.md diff --git a/documentation/src/pages/guides/validate-session-cookies/sveltekit.md b/docs/pages/guides/validate-session-cookies/sveltekit.md similarity index 100% rename from documentation/src/pages/guides/validate-session-cookies/sveltekit.md rename to docs/pages/guides/validate-session-cookies/sveltekit.md diff --git a/documentation/src/pages/index.md b/docs/pages/index.md similarity index 100% rename from documentation/src/pages/index.md rename to docs/pages/index.md diff --git a/documentation/src/pages/reference/main/Adapter.md b/docs/pages/reference/main/Adapter.md similarity index 100% rename from documentation/src/pages/reference/main/Adapter.md rename to docs/pages/reference/main/Adapter.md diff --git a/documentation/src/pages/reference/main/DatabaseSession.md b/docs/pages/reference/main/DatabaseSession.md similarity index 100% rename from documentation/src/pages/reference/main/DatabaseSession.md rename to docs/pages/reference/main/DatabaseSession.md diff --git a/documentation/src/pages/reference/main/DatabaseSessionAttributes.md b/docs/pages/reference/main/DatabaseSessionAttributes.md similarity index 100% rename from documentation/src/pages/reference/main/DatabaseSessionAttributes.md rename to docs/pages/reference/main/DatabaseSessionAttributes.md diff --git a/documentation/src/pages/reference/main/DatabaseUser.md b/docs/pages/reference/main/DatabaseUser.md similarity index 100% rename from documentation/src/pages/reference/main/DatabaseUser.md rename to docs/pages/reference/main/DatabaseUser.md diff --git a/documentation/src/pages/reference/main/DatabaseUserAttributes.md b/docs/pages/reference/main/DatabaseUserAttributes.md similarity index 100% rename from documentation/src/pages/reference/main/DatabaseUserAttributes.md rename to docs/pages/reference/main/DatabaseUserAttributes.md diff --git a/documentation/src/pages/reference/main/LegacyScrypt/hash.md b/docs/pages/reference/main/LegacyScrypt/hash.md similarity index 100% rename from documentation/src/pages/reference/main/LegacyScrypt/hash.md rename to docs/pages/reference/main/LegacyScrypt/hash.md diff --git a/documentation/src/pages/reference/main/LegacyScrypt/index.md b/docs/pages/reference/main/LegacyScrypt/index.md similarity index 100% rename from documentation/src/pages/reference/main/LegacyScrypt/index.md rename to docs/pages/reference/main/LegacyScrypt/index.md diff --git a/documentation/src/pages/reference/main/LegacyScrypt/verify.md b/docs/pages/reference/main/LegacyScrypt/verify.md similarity index 100% rename from documentation/src/pages/reference/main/LegacyScrypt/verify.md rename to docs/pages/reference/main/LegacyScrypt/verify.md diff --git a/documentation/src/pages/reference/main/Lucia/createBlankSessionCookie.md b/docs/pages/reference/main/Lucia/createBlankSessionCookie.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/createBlankSessionCookie.md rename to docs/pages/reference/main/Lucia/createBlankSessionCookie.md diff --git a/documentation/src/pages/reference/main/Lucia/createSession.md b/docs/pages/reference/main/Lucia/createSession.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/createSession.md rename to docs/pages/reference/main/Lucia/createSession.md diff --git a/documentation/src/pages/reference/main/Lucia/createSessionCookie.md b/docs/pages/reference/main/Lucia/createSessionCookie.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/createSessionCookie.md rename to docs/pages/reference/main/Lucia/createSessionCookie.md diff --git a/documentation/src/pages/reference/main/Lucia/getUserSessions.md b/docs/pages/reference/main/Lucia/getUserSessions.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/getUserSessions.md rename to docs/pages/reference/main/Lucia/getUserSessions.md diff --git a/documentation/src/pages/reference/main/Lucia/index.md b/docs/pages/reference/main/Lucia/index.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/index.md rename to docs/pages/reference/main/Lucia/index.md diff --git a/documentation/src/pages/reference/main/Lucia/invalidateSession.md b/docs/pages/reference/main/Lucia/invalidateSession.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/invalidateSession.md rename to docs/pages/reference/main/Lucia/invalidateSession.md diff --git a/documentation/src/pages/reference/main/Lucia/invalidateUserSessions.md b/docs/pages/reference/main/Lucia/invalidateUserSessions.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/invalidateUserSessions.md rename to docs/pages/reference/main/Lucia/invalidateUserSessions.md diff --git a/documentation/src/pages/reference/main/Lucia/readBearerToken.md b/docs/pages/reference/main/Lucia/readBearerToken.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/readBearerToken.md rename to docs/pages/reference/main/Lucia/readBearerToken.md diff --git a/documentation/src/pages/reference/main/Lucia/readSessionCookie.md b/docs/pages/reference/main/Lucia/readSessionCookie.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/readSessionCookie.md rename to docs/pages/reference/main/Lucia/readSessionCookie.md diff --git a/documentation/src/pages/reference/main/Lucia/validateSession.md b/docs/pages/reference/main/Lucia/validateSession.md similarity index 100% rename from documentation/src/pages/reference/main/Lucia/validateSession.md rename to docs/pages/reference/main/Lucia/validateSession.md diff --git a/documentation/src/pages/reference/main/Scrypt/hash.md b/docs/pages/reference/main/Scrypt/hash.md similarity index 100% rename from documentation/src/pages/reference/main/Scrypt/hash.md rename to docs/pages/reference/main/Scrypt/hash.md diff --git a/documentation/src/pages/reference/main/Scrypt/index.md b/docs/pages/reference/main/Scrypt/index.md similarity index 100% rename from documentation/src/pages/reference/main/Scrypt/index.md rename to docs/pages/reference/main/Scrypt/index.md diff --git a/documentation/src/pages/reference/main/Scrypt/verify.md b/docs/pages/reference/main/Scrypt/verify.md similarity index 100% rename from documentation/src/pages/reference/main/Scrypt/verify.md rename to docs/pages/reference/main/Scrypt/verify.md diff --git a/documentation/src/pages/reference/main/Session.md b/docs/pages/reference/main/Session.md similarity index 100% rename from documentation/src/pages/reference/main/Session.md rename to docs/pages/reference/main/Session.md diff --git a/documentation/src/pages/reference/main/SessionCookie.md b/docs/pages/reference/main/SessionCookie.md similarity index 100% rename from documentation/src/pages/reference/main/SessionCookie.md rename to docs/pages/reference/main/SessionCookie.md diff --git a/documentation/src/pages/reference/main/TimeSpan.md b/docs/pages/reference/main/TimeSpan.md similarity index 100% rename from documentation/src/pages/reference/main/TimeSpan.md rename to docs/pages/reference/main/TimeSpan.md diff --git a/documentation/src/pages/reference/main/User.md b/docs/pages/reference/main/User.md similarity index 100% rename from documentation/src/pages/reference/main/User.md rename to docs/pages/reference/main/User.md diff --git a/documentation/src/pages/reference/main/generateId.md b/docs/pages/reference/main/generateId.md similarity index 100% rename from documentation/src/pages/reference/main/generateId.md rename to docs/pages/reference/main/generateId.md diff --git a/documentation/src/pages/reference/main/index.md b/docs/pages/reference/main/index.md similarity index 100% rename from documentation/src/pages/reference/main/index.md rename to docs/pages/reference/main/index.md diff --git a/docs/pages/tutorials/github-oauth/astro.md b/docs/pages/tutorials/github-oauth/astro.md new file mode 100644 index 000000000..d185af829 --- /dev/null +++ b/docs/pages/tutorials/github-oauth/astro.md @@ -0,0 +1,3 @@ +--- +title: "GitHub OAuth in Astro" +--- \ No newline at end of file diff --git a/documentation/src/pages/tutorials/github-oauth/index.md b/docs/pages/tutorials/github-oauth/index.md similarity index 100% rename from documentation/src/pages/tutorials/github-oauth/index.md rename to docs/pages/tutorials/github-oauth/index.md diff --git a/docs/pages/tutorials/github-oauth/nextjs-app.md b/docs/pages/tutorials/github-oauth/nextjs-app.md new file mode 100644 index 000000000..036edd216 --- /dev/null +++ b/docs/pages/tutorials/github-oauth/nextjs-app.md @@ -0,0 +1,3 @@ +--- +title: "GitHub OAuth in Next.js App router" +--- \ No newline at end of file diff --git a/docs/pages/tutorials/github-oauth/nextjs-pages.md b/docs/pages/tutorials/github-oauth/nextjs-pages.md new file mode 100644 index 000000000..0eaa61c9c --- /dev/null +++ b/docs/pages/tutorials/github-oauth/nextjs-pages.md @@ -0,0 +1,3 @@ +--- +title: "GitHub OAuth in Next.js Pages router" +--- \ No newline at end of file diff --git a/docs/pages/tutorials/github-oauth/sveltekit.md b/docs/pages/tutorials/github-oauth/sveltekit.md new file mode 100644 index 000000000..3355b8079 --- /dev/null +++ b/docs/pages/tutorials/github-oauth/sveltekit.md @@ -0,0 +1,3 @@ +--- +title: "GitHub OAuth in SvelteKit" +--- \ No newline at end of file diff --git a/docs/pages/tutorials/username-and-password/astro.md b/docs/pages/tutorials/username-and-password/astro.md new file mode 100644 index 000000000..51c66d891 --- /dev/null +++ b/docs/pages/tutorials/username-and-password/astro.md @@ -0,0 +1,3 @@ +--- +title: "Username and password in Astro" +--- diff --git a/documentation/src/pages/tutorials/username-and-password/index.md b/docs/pages/tutorials/username-and-password/index.md similarity index 100% rename from documentation/src/pages/tutorials/username-and-password/index.md rename to docs/pages/tutorials/username-and-password/index.md diff --git a/docs/pages/tutorials/username-and-password/nextjs-app.md b/docs/pages/tutorials/username-and-password/nextjs-app.md new file mode 100644 index 000000000..dff241452 --- /dev/null +++ b/docs/pages/tutorials/username-and-password/nextjs-app.md @@ -0,0 +1,3 @@ +--- +title: "Username and password in Next.js App Router" +--- diff --git a/docs/pages/tutorials/username-and-password/nextjs-pages.md b/docs/pages/tutorials/username-and-password/nextjs-pages.md new file mode 100644 index 000000000..b3e31eac6 --- /dev/null +++ b/docs/pages/tutorials/username-and-password/nextjs-pages.md @@ -0,0 +1,3 @@ +--- +title: "Username and password in Next.js Pages Router" +--- diff --git a/docs/pages/tutorials/username-and-password/sveltekit.md b/docs/pages/tutorials/username-and-password/sveltekit.md new file mode 100644 index 000000000..53573b969 --- /dev/null +++ b/docs/pages/tutorials/username-and-password/sveltekit.md @@ -0,0 +1,3 @@ +--- +title: "Username and password in SvelteKit" +--- diff --git a/documentation/src/pages/upgrade-v3/index.md b/docs/pages/upgrade-v3/index.md similarity index 100% rename from documentation/src/pages/upgrade-v3/index.md rename to docs/pages/upgrade-v3/index.md diff --git a/documentation/src/pages/upgrade-v3/mongoose.md b/docs/pages/upgrade-v3/mongoose.md similarity index 100% rename from documentation/src/pages/upgrade-v3/mongoose.md rename to docs/pages/upgrade-v3/mongoose.md diff --git a/documentation/src/pages/upgrade-v3/mysql.md b/docs/pages/upgrade-v3/mysql.md similarity index 100% rename from documentation/src/pages/upgrade-v3/mysql.md rename to docs/pages/upgrade-v3/mysql.md diff --git a/documentation/src/pages/upgrade-v3/oauth.md b/docs/pages/upgrade-v3/oauth.md similarity index 100% rename from documentation/src/pages/upgrade-v3/oauth.md rename to docs/pages/upgrade-v3/oauth.md diff --git a/documentation/src/pages/upgrade-v3/password.md b/docs/pages/upgrade-v3/password.md similarity index 100% rename from documentation/src/pages/upgrade-v3/password.md rename to docs/pages/upgrade-v3/password.md diff --git a/documentation/src/pages/upgrade-v3/postgresql.md b/docs/pages/upgrade-v3/postgresql.md similarity index 100% rename from documentation/src/pages/upgrade-v3/postgresql.md rename to docs/pages/upgrade-v3/postgresql.md diff --git a/documentation/src/pages/upgrade-v3/prisma/index.md b/docs/pages/upgrade-v3/prisma/index.md similarity index 100% rename from documentation/src/pages/upgrade-v3/prisma/index.md rename to docs/pages/upgrade-v3/prisma/index.md diff --git a/documentation/src/pages/upgrade-v3/prisma/mysql.md b/docs/pages/upgrade-v3/prisma/mysql.md similarity index 100% rename from documentation/src/pages/upgrade-v3/prisma/mysql.md rename to docs/pages/upgrade-v3/prisma/mysql.md diff --git a/documentation/src/pages/upgrade-v3/prisma/postgresql.md b/docs/pages/upgrade-v3/prisma/postgresql.md similarity index 100% rename from documentation/src/pages/upgrade-v3/prisma/postgresql.md rename to docs/pages/upgrade-v3/prisma/postgresql.md diff --git a/documentation/src/pages/upgrade-v3/prisma/sqlite.md b/docs/pages/upgrade-v3/prisma/sqlite.md similarity index 100% rename from documentation/src/pages/upgrade-v3/prisma/sqlite.md rename to docs/pages/upgrade-v3/prisma/sqlite.md diff --git a/documentation/src/pages/upgrade-v3/sqlite.md b/docs/pages/upgrade-v3/sqlite.md similarity index 100% rename from documentation/src/pages/upgrade-v3/sqlite.md rename to docs/pages/upgrade-v3/sqlite.md diff --git a/documentation/.gitignore b/documentation/.gitignore deleted file mode 100644 index 6240da8b1..000000000 --- a/documentation/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# build output -dist/ -# generated types -.astro/ - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/documentation/README.md b/documentation/README.md deleted file mode 100644 index 5f7637e99..000000000 --- a/documentation/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# v3 documentation - -``` -pnpm dev -``` diff --git a/documentation/astro.config.mjs b/documentation/astro.config.mjs deleted file mode 100644 index 2ef671960..000000000 --- a/documentation/astro.config.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from "astro/config"; - -import tailwind from "@astrojs/tailwind"; - -// https://astro.build/config -export default defineConfig({ - markdown: { - shikiConfig: { - theme: "css-variables" - } - }, - integrations: [tailwind()] -}); diff --git a/documentation/package.json b/documentation/package.json deleted file mode 100644 index 76aad2521..000000000 --- a/documentation/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "documentation-v3", - "type": "module", - "version": "0.0.1", - "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro check && astro build", - "preview": "astro preview", - "astro": "astro", - "format": "prettier -w . --plugin=prettier-plugin-astro" - }, - "dependencies": { - "@astrojs/tailwind": "^5.0.0", - "astro": "^3.5.5", - "tailwindcss": "^3.0.24" - }, - "devDependencies": { - "@astrojs/check": "^0.3.1", - "@tailwindcss/typography": "^0.5.10", - "typescript": "^5.2.2" - } -} diff --git a/documentation/src/components/CloseIcon.astro b/documentation/src/components/CloseIcon.astro deleted file mode 100644 index f303b502d..000000000 --- a/documentation/src/components/CloseIcon.astro +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/documentation/src/components/Layout.astro b/documentation/src/components/Layout.astro deleted file mode 100644 index 802faf0ff..000000000 --- a/documentation/src/components/Layout.astro +++ /dev/null @@ -1,157 +0,0 @@ ---- -import MenuIcon from "@components/MenuIcon.astro"; - -import type { MarkdownLayoutProps } from "astro"; -import CloseIcon from "./CloseIcon.astro"; -import { sections } from "src/nav"; -import NavSection from "./NavSection.astro"; - -type Props = MarkdownLayoutProps<{ - title: string; - format?: "code"; -}>; ---- - - - - - - - {Astro.props.frontmatter.title} - - - - - - - - - - - - - - -
-
-
- Lucia - -
- -
-
-
-
- -
- -
-
-
- - - - - - diff --git a/documentation/src/components/MenuIcon.astro b/documentation/src/components/MenuIcon.astro deleted file mode 100644 index 276d9d4b1..000000000 --- a/documentation/src/components/MenuIcon.astro +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/documentation/src/components/NavSection.astro b/documentation/src/components/NavSection.astro deleted file mode 100644 index fe33283b6..000000000 --- a/documentation/src/components/NavSection.astro +++ /dev/null @@ -1,48 +0,0 @@ ---- -import type { Page } from "src/nav"; - -interface Props { - title: string; - pages: Page[]; -} - -function isSelected(href: string, currentPathname: string): boolean { - if (removeLeadingSlash(href) === removeLeadingSlash(currentPathname)) { - return true; - } - return currentPathname.startsWith(removeLeadingSlash(href) + "/"); -} - -function removeLeadingSlash(s: string): string { - if (s.endsWith("/")) { - return s.split("/").slice(0, -1).join("/"); - } - return s; -} ---- - -
-

{Astro.props.title}

- -
diff --git a/documentation/src/env.d.ts b/documentation/src/env.d.ts deleted file mode 100644 index 9c03f0a2c..000000000 --- a/documentation/src/env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -/// diff --git a/documentation/src/nav.ts b/documentation/src/nav.ts deleted file mode 100644 index 7aa49e743..000000000 --- a/documentation/src/nav.ts +++ /dev/null @@ -1,56 +0,0 @@ -export const sections: Section[] = [ - { - title: "Start here", - pages: [ - ["Getting-started", "/getting-started"], - ["Database", "/database"], - ["Upgrade to v3", "/upgrade-v3"] - ] - }, - { - title: "Tutorials", - pages: [ - ["GitHub OAuth", "/tutorials/github-oauth"], - ["Username and password", "/tutorials/username-and-password"] - ] - }, - { - title: "Basics", - pages: [ - ["Sessions", "/basics/sessions"], - ["Users", "/basics/users"], - ["Configuration", "/basics/configuration"], - ["Troubleshooting", "/basics/help"] - ] - }, - { - title: "Guides", - pages: [ - ["Validate session cookies", "/guides/validate-session-cookies"], - ["Validate bearer tokens", "/guides/validate-bearer-tokens"], - ["OAuth", "/guides/oauth"], - ["Email and password", "/guides/email-and-password"], - ["Passkeys", "/guides/passkeys"], - ["Improving sessions", "/guides/improving-sessions"] - ] - }, - { - title: "API reference", - pages: [["lucia", "/reference/main", "code"]] - }, - { - title: "Community", - pages: [ - ["Discord", "https://discord.com/invite/PwrK3kpVR3"], - ["GitHub", "https://github.com/lucia-auth/lucia"], - ["Twitter", "https://twitter.com/lucia-auth"] - ] - } -]; - -export interface Section { - title: string; - pages: Page[]; -} - -export type Page = [title: string, href: string, format?: "code"]; diff --git a/documentation/src/pages/tutorials/github-oauth/astro.md b/documentation/src/pages/tutorials/github-oauth/astro.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/src/pages/tutorials/github-oauth/nextjs-app.md b/documentation/src/pages/tutorials/github-oauth/nextjs-app.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/src/pages/tutorials/github-oauth/nextjs-pages.md b/documentation/src/pages/tutorials/github-oauth/nextjs-pages.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/src/pages/tutorials/github-oauth/sveltekit.md b/documentation/src/pages/tutorials/github-oauth/sveltekit.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/src/pages/tutorials/username-and-password/astro.md b/documentation/src/pages/tutorials/username-and-password/astro.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/src/pages/tutorials/username-and-password/nextjs-app.md b/documentation/src/pages/tutorials/username-and-password/nextjs-app.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/src/pages/tutorials/username-and-password/nextjs-pages.md b/documentation/src/pages/tutorials/username-and-password/nextjs-pages.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/src/pages/tutorials/username-and-password/sveltekit.md b/documentation/src/pages/tutorials/username-and-password/sveltekit.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/src/utils/github.ts b/documentation/src/utils/github.ts deleted file mode 100644 index 55df531b8..000000000 --- a/documentation/src/utils/github.ts +++ /dev/null @@ -1,40 +0,0 @@ -type Contributor = { - avatar: string; - profileLink: string; - username: string; -}; - -let contributors: Contributor[]; - -export async function getGithubContributors(): Promise { - if (contributors) return contributors; - const contributorsRequest = new Request( - "https://api.github.com/repos/lucia-auth/lucia/contributors?per_page=100" - ); - if (import.meta.env.GITHUB_API_KEY) { - contributorsRequest.headers.set("Authorization", `Bearer ${import.meta.env.GITHUB_API_KEY}`); - } - const contributorsResponse = await fetch(contributorsRequest); - - if (!contributorsResponse.ok) { - throw new Error("Failed to fetch data from GitHub"); - } - - const contributorsResult = (await contributorsResponse.json()) as { - avatar_url: string; - html_url: string; - login: string; - }[]; - - contributors = contributorsResult.map((val) => { - const url = new URL(val.avatar_url); - url.searchParams.set("s", "128"); // set image size to 128 x 128 - url.searchParams.delete("v"); - return { - avatar: url.href, - profileLink: val.html_url, - username: val.login - }; - }); - return contributors; -} diff --git a/documentation/tailwind.config.mjs b/documentation/tailwind.config.mjs deleted file mode 100644 index 19c44d1fc..000000000 --- a/documentation/tailwind.config.mjs +++ /dev/null @@ -1,14 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -export default { - content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"], - theme: { - extend: { - colors: { - main: "#5f57ff" - }, - screens: { - lg: "960px" - } - } - } -}; diff --git a/documentation/tsconfig.json b/documentation/tsconfig.json deleted file mode 100644 index 09edf4ea0..000000000 --- a/documentation/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "astro/tsconfigs/strict", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@layouts/*": ["src/layouts/*"], - "@components/*": ["src/components/*"] - } - } -}