mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-14 08:42:31 +02:00
feat(v2): generalize usage of _ prefix convention to exclude content files/folders (#5173)
* create a swizzleWarning partial for shared text * Generalize usage of _ prefix convention to exclude content files/folders * add api doc * MDX loader should not expect metadata/frontmatter on MDX partial files
This commit is contained in:
parent
0851e0e5bf
commit
8bdb3da233
40 changed files with 249 additions and 80 deletions
|
@ -12,6 +12,8 @@ import {
|
|||
AdmonitionsSchema,
|
||||
URISchema,
|
||||
} from '@docusaurus/utils-validation';
|
||||
import {GlobExcludeDefault} from '@docusaurus/utils';
|
||||
|
||||
import {OptionValidationContext, ValidationResult} from '@docusaurus/types';
|
||||
import chalk from 'chalk';
|
||||
import admonitions from 'remark-admonitions';
|
||||
|
@ -26,6 +28,7 @@ export const DEFAULT_OPTIONS: Omit<PluginOptions, 'id' | 'sidebarPath'> = {
|
|||
routeBasePath: 'docs', // URL Route.
|
||||
homePageId: undefined, // TODO remove soon, deprecated
|
||||
include: ['**/*.{md,mdx}'], // Extensions to include.
|
||||
exclude: GlobExcludeDefault,
|
||||
sidebarItemsGenerator: DefaultSidebarItemsGenerator,
|
||||
numberPrefixParser: DefaultNumberPrefixParser,
|
||||
docLayoutComponent: '@theme/DocPage',
|
||||
|
@ -66,6 +69,7 @@ export const OptionsSchema = Joi.object({
|
|||
.default(DEFAULT_OPTIONS.routeBasePath),
|
||||
homePageId: Joi.string().optional(),
|
||||
include: Joi.array().items(Joi.string()).default(DEFAULT_OPTIONS.include),
|
||||
exclude: Joi.array().items(Joi.string()).default(DEFAULT_OPTIONS.exclude),
|
||||
sidebarPath: Joi.alternatives().try(
|
||||
Joi.boolean().invalid(true),
|
||||
Joi.string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue