mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
<!--
Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md
-->
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> This pull request updates the Stack Auth documentation structure,
enhances navigation and layout functionalities, and introduces new
components for improved user experience.
>
> - **Behavior**:
> - Introduces `PlatformRedirect` component in `platform-redirect.tsx`
for redirecting users to their preferred platform.
> - Adds `usePlatformPreference` hook in `use-platform-preference.ts`
for managing platform preferences.
> - Updates `getSmartRedirectUrl()` in `navigation-utils.ts` to use
`getSmartPlatformRedirect()`.
> - **Layout and Navigation**:
> - Enhances sidebar functionality with collapsible sections in
`docs.tsx` and `sidebar-context.tsx`.
> - Adds `DocsSidebarCollapseTrigger` in `docs.tsx` for sidebar
collapse/expand functionality.
> - Updates `SharedHeader` in `shared-header.tsx` to include
platform-aware navigation links.
> - **Documentation Structure**:
> - Updates `meta.json` files in `templates` to reflect new
documentation structure.
> - Renames `overview.mdx` to `index.mdx` in `sdk` and `components`
directories.
> - Adds detailed documentation for `Team`, `TeamUser`, and
`ContactChannel` in respective `.mdx` files.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 21e55737cb. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
---------
Co-authored-by: Stack-Bot <madison@stack-auth.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
284 lines
8.2 KiB
YAML
284 lines
8.2 KiB
YAML
# Platform-specific content filtering configuration
|
|
# Explicit page-by-page listing approach
|
|
#
|
|
# NOTE: Changes to this file automatically update the smart platform navigation system.
|
|
# The src/lib/platform-navigation.ts file is auto-generated from this data during build.
|
|
|
|
pages:
|
|
# Root pages
|
|
- path: overview.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: faq.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
# SDK Reference
|
|
- path: sdk/index.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
# Components
|
|
- path: components/index.mdx
|
|
platforms: ["next", "react"] # Only React-like platforms
|
|
|
|
# Getting Started
|
|
- path: getting-started/setup.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: getting-started/components.mdx
|
|
platforms: ["next", "react"] # Only React-like platforms
|
|
|
|
- path: getting-started/users.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: getting-started/example-pages.mdx
|
|
platforms: ["js"] # Only vanilla JS
|
|
|
|
# Auth Providers - Available for all platforms since OAuth is universal
|
|
- path: concepts/auth-providers/index.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/github.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/google.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/facebook.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/microsoft.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/spotify.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/discord.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/gitlab.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/apple.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/bitbucket.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/linkedin.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
- path: concepts/auth-providers/x-twitter.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
# Advanced auth methods - More frontend-focused
|
|
- path: getting-started/auth-providers/passkey.mdx
|
|
platforms: ["next", "react", "js"] # No Python (frontend feature)
|
|
|
|
- path: getting-started/auth-providers/two-factor-auth.mdx
|
|
platforms: ["next", "react", "js"] # No Python (frontend feature)
|
|
|
|
- path: getting-started/production.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
# Concepts
|
|
- path: concepts/stack-app.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: concepts/custom-user-data.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: concepts/user-onboarding.mdx
|
|
platforms: ["next", "react"] # No JS or Python
|
|
|
|
- path: concepts/oauth.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: concepts/orgs-and-teams.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: concepts/team-selection.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: concepts/permissions.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: concepts/api-keys.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: concepts/webhooks.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: concepts/backend-integration.mdx
|
|
platforms: ["next", "react", "js", "python"]
|
|
|
|
# Components (React-like only)
|
|
- path: components/overview.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/user-button.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/selected-team-switcher.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/account-settings.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/sign-in.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/sign-up.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/credential-sign-in.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/credential-sign-up.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/magic-link-sign-in.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/forgot-password.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/password-reset.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/oauth-button.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/oauth-button-group.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/stack-handler.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/stack-provider.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: components/stack-theme.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
# Customization (React-like only)
|
|
- path: customization/dark-mode.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: customization/custom-styles.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: customization/internationalization.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: customization/custom-pages.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: customization/page-examples/index.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: customization/page-examples/sign-in.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: customization/page-examples/sign-up.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: customization/page-examples/forgot-password.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
- path: customization/page-examples/password-reset.mdx
|
|
platforms: ["next", "react"]
|
|
|
|
# SDK Reference
|
|
- path: sdk/overview.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/overview-new.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/objects/stack-app.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/objects/stack-app-test.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/api-key.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/connected-account.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/contact-channel.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/project.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/team.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/team-permission.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/team-profile.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/team-user.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: sdk/types/user.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
# SDK Hooks (React-like only)
|
|
- path: sdk/hooks/use-stack-app.mdx
|
|
platforms: ["next", "react"] # No JS or Python
|
|
|
|
- path: sdk/hooks/use-user.mdx
|
|
platforms: ["next", "react"] # No JS or Python
|
|
|
|
# Snippets (utility files - exclude from Python)
|
|
- path: snippets/always-tab-codeblock.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: snippets/big-divider.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: snippets/divider.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: snippets/get-user-or-parameter.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: snippets/make-full-page.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: snippets/stack-app-constructor-options-after-ssk.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: snippets/stack-app-constructor-options-before-ssk.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
- path: snippets/use-on-server-callout.mdx
|
|
platforms: ["next", "react", "js"] # No Python
|
|
|
|
# Others
|
|
- path: others/self-host.mdx
|
|
platforms: ["next", "react", "js", "python"] # All platforms
|
|
|
|
- path: others/supabase.mdx
|
|
platforms: ["next"] # Next only
|
|
|
|
- path: others/cli-authentication.mdx
|
|
platforms: ["python"] # Python only
|
|
|
|
# Python-specific content from templates-python/
|
|
# Authentication section
|
|
|
|
- path: concepts/user-authentication.mdx
|
|
platforms: ["python"] # python only
|
|
|
|
- path: concepts/teams-management.mdx
|
|
platforms: ["python"] # python only
|
|
|
|
|
|
|