mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 12:52:31 +02:00
refactor(v2): remove page plugin component
This commit is contained in:
parent
1827c6f333
commit
637047af2c
4 changed files with 12 additions and 27 deletions
|
@ -13,7 +13,6 @@ const DEFAULT_OPTIONS = {
|
|||
path: 'pages', // Path to data on filesystem, relative to site dir.
|
||||
routeBasePath: '', // URL Route.
|
||||
include: ['**/*.{js,jsx}'], // Extensions to include.
|
||||
component: '@theme/Page',
|
||||
};
|
||||
|
||||
class DocusaurusPluginContentPages {
|
||||
|
@ -65,7 +64,6 @@ class DocusaurusPluginContentPages {
|
|||
}
|
||||
|
||||
async contentLoaded({content, actions}) {
|
||||
const {component} = this.options;
|
||||
const {addRoute, createData} = actions;
|
||||
|
||||
await Promise.all(
|
||||
|
@ -77,10 +75,9 @@ class DocusaurusPluginContentPages {
|
|||
);
|
||||
addRoute({
|
||||
path: permalink,
|
||||
component,
|
||||
component: source,
|
||||
exact: true,
|
||||
modules: {
|
||||
content: source,
|
||||
metadata: metadataPath,
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue