mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
Pages were missing from the sitemap after the reorganization. Added them back in. Also added an optional priority that can be specified by including `sitemapPriority` in content metadata. Used on the deprecated Auth Helpers pages to see if we can tweak the relative SEO ranking for them.
18 lines
471 B
TypeScript
18 lines
471 B
TypeScript
import sections from '../../spec/common-api-sections.json'
|
|
import { flattenSections } from '../helpers'
|
|
|
|
const flatSections = flattenSections(sections)
|
|
|
|
/**
|
|
* Generates the API page links for the management API reference.
|
|
* @returns {Array<{link: string}>} - An array of API page links.
|
|
*/
|
|
export function generateAPIPages() {
|
|
let apiPages = []
|
|
|
|
flatSections.map((section) => {
|
|
apiPages.push({ link: `reference/api/${section.slug}` })
|
|
})
|
|
return apiPages
|
|
}
|