mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 09:20:21 -04:00
e46ab9c1a2
* refactor: reading markdown docs files
Refactor how Markdown docs files are read:
- Reuses the same logic across search index generation & page generation
- Improves the indexed content for search:
- Stops removing MDX components, which often contain useful
information like Admonitions
- Denormalizes Partials and CodeSamples for more complete content
This is a prerequisite step for implementing the "Copy docs as Markdown"
functionality.
Only touches regular guides for now, not federated ones.
* fix: tailwind build error (#37728)
We changed to default to ESM imports a while ago, which means local
builds are now breaking because the Tailwind uses a require. Changed to
CJS for Tailwind config file. (I have no idea how this has been working
on Vercel all this time.)
* style: prettier
34 lines
610 B
TypeScript
34 lines
610 B
TypeScript
import type { Section } from '../../helpers.mdx.js'
|
|
|
|
export abstract class BaseLoader {
|
|
type: string
|
|
|
|
constructor(
|
|
public source: string,
|
|
public path: string
|
|
) {}
|
|
|
|
abstract load(): Promise<BaseSource[]>
|
|
}
|
|
|
|
export abstract class BaseSource {
|
|
type: string
|
|
checksum?: string
|
|
meta?: Record<string, unknown>
|
|
sections?: Section[]
|
|
|
|
constructor(
|
|
public source: string,
|
|
public path: string
|
|
) {}
|
|
|
|
abstract process(): Promise<{
|
|
checksum: string
|
|
meta?: Record<string, unknown>
|
|
ragIgnore?: boolean
|
|
sections: Section[]
|
|
}>
|
|
|
|
abstract extractIndexedContent(): string
|
|
}
|