docs: Change key name for dynamic loading docs (#38011)

Change key name for dynamic loading docs
This commit is contained in:
Chris Chinchilla
2025-09-09 09:28:49 +02:00
committed by GitHub
parent 774825c1cc
commit 58100a0121
18 changed files with 23 additions and 23 deletions

View File

@@ -354,11 +354,11 @@ Some guides and tutorials will require that users copy their Supabase project UR
```mdx
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
```
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
### Step Hike

View File

@@ -274,7 +274,7 @@ function VariableView({ variable, className }: { variable: Variable; className?:
const hasBranches = selectedProject?.is_branch_enabled ?? false
const ref = hasBranches ? selectedBranch?.project_ref : selectedProject?.ref
const needsApiQuery = variable === 'anonKey' || variable === 'url'
const needsApiQuery = variable === 'publishableKey' || variable === 'url'
const needsSupavisorQuery = variable === 'sessionPooler'
const {
@@ -303,7 +303,7 @@ function VariableView({ variable, className }: { variable: Variable; className?:
switch (variable) {
case 'url':
return !apiData.app_config?.endpoint
case 'anonKey':
case 'publishableKey':
return !apiData.service_api_keys?.some((key) => key.tags === 'anon')
}
}
@@ -336,7 +336,7 @@ function VariableView({ variable, className }: { variable: Variable; className?:
case 'url':
variableValue = `https://${apiData?.app_config?.endpoint}`
break
case 'anonKey':
case 'publishableKey':
variableValue = apiData?.service_api_keys?.find((key) => key.tags === 'anon')?.api_key || ''
break
case 'sessionPooler':

View File

@@ -6,7 +6,7 @@ export type Org = OrganizationsData[number]
export type Project = ProjectsData[number]
export type Branch = BranchesData[number]
export type Variable = 'url' | 'anonKey' | 'sessionPooler'
export type Variable = 'url' | 'publishableKey' | 'sessionPooler'
function removeDoubleQuotes(str: string) {
return str.replaceAll('"', '')
@@ -30,7 +30,7 @@ function unescapeDoubleQuotes(str: string) {
export const prettyFormatVariable: Record<Variable, string> = {
url: 'Project URL',
anonKey: 'Anon key',
publishableKey: 'Publishable key',
sessionPooler: 'Connection string (pooler session mode)',
}

View File

@@ -42,7 +42,7 @@ pnpm add @supabase/ssr @supabase/supabase-js
In your environment variables file, set your Supabase URL and Supabase Anon Key:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
<Tabs scrollable size="small" type="underlined" defaultActiveId="nextjs" queryGroup="framework">

View File

@@ -39,7 +39,7 @@ Create a `.env.local` file in your project root directory.
Fill in your `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>
@@ -560,7 +560,7 @@ Create a `.env.local` file in your project root directory.
Fill in your `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -34,7 +34,7 @@ Create a `.env.local` file in your project root directory.
Fill in your `PUBLIC_SUPABASE_URL` and `PUBLIC_SUPABASE_PUBLISHABLE_KEY`:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -58,7 +58,7 @@ hideToc: true
Open `lib/main.dart` and edit the main function to initialize Supabase using your project URL and public API (anon) key:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -50,7 +50,7 @@ hideToc: true
Lastly, [enable anonymous sign-ins](https://supabase.com/dashboard/project/_/settings/auth) in the Auth settings.
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>
<StepHikeCompact.Code>

View File

@@ -42,7 +42,7 @@ hideToc: true
Create a new `Supabase.swift` file add a new Supabase instance using your project URL and public API (anon) key:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -79,7 +79,7 @@ hideToc: true
Replace the `supabaseUrl` and `supabaseKey` with your own:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -40,7 +40,7 @@ hideToc: true
Rename `.env.example` to `.env.local` and populate with your Supabase connection variables:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -56,7 +56,7 @@ hideToc: true
Create a `.env` file and populate with your Supabase connection variables:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -56,7 +56,7 @@ hideToc: true
Create a `.env.local` file and populate with your Supabase connection variables:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -78,7 +78,7 @@ hideToc: true
You now have to update the `supabaseClient` with the `SUPABASE_URL` and `SUPABASE_KEY` of your Supabase API. The `supabaseClient` is used in auth provider and data provider methods that allow the refine app to connect to your Supabase backend.
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -56,7 +56,7 @@ hideToc: true
Create a `.env.local` file and populate with your Supabase connection variables:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -57,7 +57,7 @@ hideToc: true
Create a `.env` file at the root of your project and populate with your Supabase connection variables:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -56,7 +56,7 @@ hideToc: true
Create a `.env.local` file and populate with your Supabase connection variables:
<ProjectConfigVariables variable="url" />
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</StepHikeCompact.Details>

View File

@@ -85,7 +85,7 @@ Create a HTTP drain under the [Project Settings > Log Drains](https://supabase.c
- Under URL, set it to your edge function URL `https://[PROJECT REF].supabase.co/functions/v1/hello-world`
- Under Headers, set the `Authorization: Bearer [ANON KEY]`
<ProjectConfigVariables variable="anonKey" />
<ProjectConfigVariables variable="publishableKey" />
</AccordionItem>