mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
## I have read the CONTRIBUTING.md file. YES ## What kind of change does this PR introduce? Revert. Removes the Multigres Public Alpha docs section that was published in #49020. Linear: MUL-1621 (follow-up to MUL-452). ## What is the current behavior? - Overview guide live at `/docs/guides/database/multigres` - Compatibility stub live at `/docs/guides/database/multigres/compatibility` - Database sidebar has a Multigres section - Features table lists Database / Multigres / `public alpha` - Database "What you get" cards render for Multigres ## What is the new behavior? Clean revert of #49020: overview and compatibility pages removed, sidebar entry removed, features table row removed, "What you get" cards removed. The unrelated `ContentListings` optional-`href` support this PR introduced is also reverted since nothing else uses it yet. Docs go back up once Sugu gives the go-ahead to re-publish (tracked in MUL-1621). ## Additional context - `pnpm --filter docs exec vitest run lib/content-listings.test.ts` — 20 passed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Removed Multigres documentation, navigation links, feature listings, and related references. - Updated the JavaScript client library link in the getting-started guide. - Corrected the High Availability badge’s “Read more” link. - **Content Listings** - Content listing entries now require links and consistently render as linked items. - Non-linked listing items are no longer displayed as static content. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Nik Richers <nik@validmind.ai>
60 lines
1.7 KiB
TypeScript
60 lines
1.7 KiB
TypeScript
import { withDocsBasePath } from '~/internals/internal-links'
|
|
import type { ContentListingGroup } from '~/lib/content-listings.schema'
|
|
import {
|
|
filterContentListingItems,
|
|
getContentListingById,
|
|
isExternalContentListingHref,
|
|
} from '~/lib/content-listings.utils'
|
|
|
|
import { getInternalLinkBaseUrl } from '../internal-links'
|
|
|
|
const HEADING_MARKDOWN: Record<'h2' | 'h3' | 'h4', string> = {
|
|
h2: '##',
|
|
h3: '###',
|
|
h4: '####',
|
|
}
|
|
|
|
export function serializeContentListingGroupToMarkdown(
|
|
group: ContentListingGroup,
|
|
linkBaseUrl: string
|
|
): string {
|
|
const items = filterContentListingItems(group.items)
|
|
if (!items.length) return ''
|
|
|
|
const lines: string[] = []
|
|
if (group.heading) {
|
|
const level = group.headingLevel ?? 'h2'
|
|
lines.push(`${HEADING_MARKDOWN[level]} ${group.heading}`)
|
|
lines.push('')
|
|
}
|
|
|
|
if (group.description) {
|
|
lines.push(group.description)
|
|
lines.push('')
|
|
}
|
|
|
|
for (const item of items) {
|
|
const href = isExternalContentListingHref(item.href)
|
|
? item.href
|
|
: `${linkBaseUrl}${withDocsBasePath(item.href)}`
|
|
const description = item.subtitle ? `${item.subtitle}. ${item.description}` : item.description
|
|
lines.push(`- **[${item.title}](${href}):** ${description}`)
|
|
}
|
|
|
|
return lines.join('\n')
|
|
}
|
|
|
|
/**
|
|
* Markdown export handler for `<ContentListings id="..." />`. Looks up the
|
|
* group by id in the same data registry the React component uses.
|
|
*/
|
|
export const ContentListings = ({ props }: { props: Record<string, unknown> }): string => {
|
|
const id = typeof props.id === 'string' ? props.id : ''
|
|
if (!id) return ''
|
|
|
|
const group = getContentListingById(id)
|
|
if (!group) return ''
|
|
|
|
return serializeContentListingGroupToMarkdown(group, getInternalLinkBaseUrl())
|
|
}
|