mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +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
|
@ -16,6 +16,7 @@ import {
|
|||
reportMessage,
|
||||
posixPath,
|
||||
addTrailingPathSeparator,
|
||||
createMatcher,
|
||||
} from '@docusaurus/utils';
|
||||
import {
|
||||
STATIC_DIR_NAME,
|
||||
|
@ -459,9 +460,10 @@ export default function pluginContentBlog(
|
|||
beforeDefaultRemarkPlugins,
|
||||
beforeDefaultRehypePlugins,
|
||||
staticDir: path.join(siteDir, STATIC_DIR_NAME),
|
||||
// Note that metadataPath must be the same/in-sync as
|
||||
// the path from createData for each MDX.
|
||||
isMDXPartial: createMatcher(options.exclude),
|
||||
metadataPath: (mdxPath: string) => {
|
||||
// Note that metadataPath must be the same/in-sync as
|
||||
// the path from createData for each MDX.
|
||||
const aliasedPath = aliasedSitePath(mdxPath, siteDir);
|
||||
return path.join(
|
||||
dataDir,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue