mirror of
https://github.com/wavetermdev/docusaurus-og.git
synced 2026-08-05 13:46:35 -07:00
feat: support docusaurus's default theme
This commit is contained in:
@@ -78,14 +78,15 @@ export default function logosPreset(
|
||||
|
||||
plugins.push('docusaurus-plugin-sass')
|
||||
|
||||
plugins.push(
|
||||
// changing the order of plugins passed to makeSearchPluginConfig function
|
||||
// may cause the search plugin to skip indexing some pages.
|
||||
...makeSearchPluginConfig(
|
||||
[...plugins, ...context.siteConfig.plugins],
|
||||
options,
|
||||
),
|
||||
)
|
||||
if (options.theme?.name !== ThemeNames.DocusaurusDefault)
|
||||
plugins.push(
|
||||
// changing the order of plugins passed to makeSearchPluginConfig function
|
||||
// may cause the search plugin to skip indexing some pages.
|
||||
...makeSearchPluginConfig(
|
||||
[...plugins, ...context.siteConfig.plugins],
|
||||
options,
|
||||
),
|
||||
)
|
||||
|
||||
if (options.theme?.name === ThemeNames.Default)
|
||||
themes.push([
|
||||
|
||||
@@ -3,6 +3,7 @@ import { DefaultThemeOptions } from './themes'
|
||||
|
||||
export enum ThemeNames {
|
||||
Default = 'default',
|
||||
DocusaurusDefault = 'docusaurus-default',
|
||||
}
|
||||
|
||||
export enum BusinessUnits {
|
||||
@@ -28,10 +29,15 @@ export type ContactInfo = Contact[]
|
||||
export type PresetConfig = {
|
||||
businessUnit: BusinessUnits
|
||||
contactInfo?: string
|
||||
theme?: {
|
||||
name: ThemeNames.Default
|
||||
options?: DefaultThemeOptions
|
||||
}
|
||||
theme?:
|
||||
| {
|
||||
name: ThemeNames.Default
|
||||
options?: DefaultThemeOptions
|
||||
}
|
||||
| {
|
||||
name: ThemeNames.DocusaurusDefault
|
||||
options?: DefaultThemeOptions
|
||||
}
|
||||
customSiteConfig?: boolean
|
||||
docs?: Partial<DocPluginOptions>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user