Files
supabase/apps/docs/internals/files/api.ts
T
Charis c757fcab20 fix,feat(sitemap): add all pages + priority (#29083)
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.
2024-09-04 11:16:51 -04:00

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
}