mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
issues displaying new ref docs when on wrong route
This commit is contained in:
1 parent
fe9c513e1c
commit
72f4df1418
11 files changed
+113
-61
No files matched your search
@@ -52,6 +52,7 @@ export default function Config() {
|
||||
{section.operations.map((operation: any) => (
|
||||
<div className="border-b pb-8">
|
||||
<RefSubLayout.Section
|
||||
slug={operation.id}
|
||||
title={operation.summary}
|
||||
id={operation.operationId}
|
||||
monoFont={false}
|
||||
|
||||
@@ -48,6 +48,7 @@ export default function Config() {
|
||||
{generatedSpec.operations.map((operation: any) => (
|
||||
<div className="border-b pb-8">
|
||||
<RefSubLayout.Section
|
||||
slug={operation.id}
|
||||
title={operation.summary}
|
||||
id={operation.operationId}
|
||||
monoFont={false}
|
||||
|
||||
@@ -65,7 +65,12 @@ export default function Config(props) {
|
||||
<div className="grid gap-32 mx-auto max-w-5xl mt-24">
|
||||
{cliSpec.commands.map((command: Command, commandIndex) => {
|
||||
return (
|
||||
<RefSubLayout.Section title={'$ ' + command.title} id={command.id} monoFont={true}>
|
||||
<RefSubLayout.Section
|
||||
slug={command.id}
|
||||
title={'$ ' + command.title}
|
||||
id={command.id}
|
||||
monoFont={true}
|
||||
>
|
||||
<RefSubLayout.Details>
|
||||
<div className="grid ref-container" id={command.id}>
|
||||
<div className="border-b pb-8" key={command.id}>
|
||||
@@ -147,9 +152,9 @@ export default function Config(props) {
|
||||
export async function getStaticProps({ params }: { params: { slug: string[] } }) {
|
||||
let slug
|
||||
if (params.slug.length > 1) {
|
||||
slug = `docs/${params.slug.join('/')}`
|
||||
slug = `docs/reference/cli/${params.slug.join('/')}`
|
||||
} else {
|
||||
slug = `docs/${params.slug[0]}`
|
||||
slug = `docs/reference/cli/${params.slug[0]}`
|
||||
}
|
||||
|
||||
let doc = getDocsBySlug(slug)
|
||||
|
||||
@@ -42,7 +42,7 @@ export default function DartReference(props) {
|
||||
useEffect(() => {
|
||||
if (isNewDocs && document && slug !== 'start') {
|
||||
// re-enable this when the new yaml shape file is moved into this branch
|
||||
document.querySelector(`#${slug}`).scrollIntoView()
|
||||
document.querySelector(`#${slug}`) && document.querySelector(`#${slug}`).scrollIntoView()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -282,13 +282,12 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
|
||||
slug = `docs/reference/dart/${params.slug[0]}`
|
||||
}
|
||||
|
||||
let doc = getDocsBySlug(slug)
|
||||
const content = await serialize(doc.content || '')
|
||||
|
||||
/*
|
||||
* handle old ref pages
|
||||
*/
|
||||
if (process.env.NEXT_PUBLIC_NEW_DOCS === 'false') {
|
||||
let doc = getDocsBySlug(slug)
|
||||
const content = await serialize(doc.content || '')
|
||||
return {
|
||||
props: {
|
||||
/*
|
||||
|
||||
@@ -282,13 +282,12 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
|
||||
slug = `docs/reference/dart/${params.slug[0]}`
|
||||
}
|
||||
|
||||
let doc = getDocsBySlug(slug)
|
||||
const content = await serialize(doc.content || '')
|
||||
|
||||
/*
|
||||
* handle old ref pages
|
||||
*/
|
||||
if (process.env.NEXT_PUBLIC_NEW_DOCS === 'false') {
|
||||
let doc = getDocsBySlug(slug)
|
||||
const content = await serialize(doc.content || '')
|
||||
return {
|
||||
props: {
|
||||
/*
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function JSReference(props) {
|
||||
// find the #sign-up element and scroll to that
|
||||
useEffect(() => {
|
||||
if (isNewDocs && document && slug !== 'start') {
|
||||
document.querySelector(`#${slug}`).scrollIntoView()
|
||||
document.querySelector(`#${slug}`) && document.querySelector(`#${slug}`).scrollIntoView()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -294,13 +294,12 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
|
||||
slug = `docs/reference/javascript/${params.slug[0]}`
|
||||
}
|
||||
|
||||
let doc = getDocsBySlug(slug)
|
||||
const content = await serialize(doc.content || '')
|
||||
|
||||
/*
|
||||
* handle old ref pages
|
||||
*/
|
||||
if (process.env.NEXT_PUBLIC_NEW_DOCS === 'false') {
|
||||
let doc = getDocsBySlug(slug)
|
||||
const content = await serialize(doc.content || '')
|
||||
return {
|
||||
props: {
|
||||
/*
|
||||
|
||||
@@ -450,13 +450,12 @@ export async function getStaticProps({ params }: { params: { slug: string[] } })
|
||||
slug = `docs/reference/javascript/${params.slug[0]}`
|
||||
}
|
||||
|
||||
let doc = getDocsBySlug(slug)
|
||||
const content = await serialize(doc.content || '')
|
||||
|
||||
/*
|
||||
* handle old ref pages
|
||||
*/
|
||||
if (process.env.NEXT_PUBLIC_NEW_DOCS === 'false') {
|
||||
let doc = getDocsBySlug(slug)
|
||||
const content = await serialize(doc.content || '')
|
||||
return {
|
||||
props: {
|
||||
/*
|
||||
|
||||
@@ -52,6 +52,7 @@ export default function Config() {
|
||||
{section.operations.map((operation: any) => (
|
||||
<div className="border-b pb-8">
|
||||
<RefSubLayout.Section
|
||||
slug={operation.id}
|
||||
title={operation.summary}
|
||||
id={operation.operationId}
|
||||
monoFont={false}
|
||||
|
||||
@@ -318,6 +318,18 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/cli/local-development</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/cli/managing-environments</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/database/arrays</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -402,18 +414,6 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/cli/local-development</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/cli/managing-environments</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/auth/auth-apple</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -870,12 +870,6 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/new/auth/auth-login</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/tutorials/with-angular</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -960,6 +954,12 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/new/auth/auth-login</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/new/tutorials/nextjs</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -1002,6 +1002,18 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/functions/examples/index</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/functions/examples/og-image</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/auth/auth-helpers/auth-ui</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -1032,18 +1044,6 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/functions/examples/index</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/guides/functions/examples/og-image</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/api</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -1140,12 +1140,24 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/javascript/auth-admin-invoke</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/javascript/auth-admin-listusers</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/javascript/auth-admin-resetpasswordforemail</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/javascript/auth-admin-updateuserbyid</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -1626,6 +1638,18 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/auth-admin-invoke</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/auth-admin-resetpasswordforemail</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/auth-currentsession</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -1638,6 +1662,18 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/auth-getsession</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/auth-getuser</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/auth-onauthstatechange</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -1746,6 +1782,12 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/in</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/in_</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -1770,6 +1812,12 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/is</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/docs/reference/dart/is_</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
|
||||
@@ -54,6 +54,12 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/blog/</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/contact/enterprise</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -72,12 +78,6 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/edge-functions</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/launch-week/ticket-image</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
@@ -103,13 +103,7 @@
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/blog/</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/realtime</loc>
|
||||
<loc>https://supabase.com/edge-functions</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
@@ -120,6 +114,12 @@
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/realtime</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<changefreq>0.5</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://supabase.com/blog/supabase-alpha-april-2020</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
|
||||
Generated
+1
-1
@@ -49438,7 +49438,7 @@
|
||||
"globby": "^12.0.2",
|
||||
"graphql": "^16.5.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"isbot": "*",
|
||||
"isbot": "^3.6.5",
|
||||
"jsrsasign": "^10.5.26",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-toc": "^1.2.0",
|
||||
|
||||
Reference in new issue
Block a user