mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-07 21:32:38 +02:00
fix(v2):pass siteConfig as prop to pages (#3025)
* pass config as prop to pages * use existing file * Update packages/docusaurus-plugin-content-pages/src/index.ts Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com> Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
This commit is contained in:
parent
11751c20b0
commit
a3849860ae
2 changed files with 3 additions and 1 deletions
|
@ -75,6 +75,9 @@ export default function pluginContentPages(
|
||||||
path: permalink,
|
path: permalink,
|
||||||
component: source,
|
component: source,
|
||||||
exact: true,
|
exact: true,
|
||||||
|
modules: {
|
||||||
|
config: `@generated/docusaurus.config`,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
@ -62,7 +62,6 @@ const QUOTES = [
|
||||||
function Home() {
|
function Home() {
|
||||||
const context = useDocusaurusContext();
|
const context = useDocusaurusContext();
|
||||||
const {siteConfig: {customFields = {}, tagline} = {}} = context;
|
const {siteConfig: {customFields = {}, tagline} = {}} = context;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout
|
<Layout
|
||||||
permalink="/"
|
permalink="/"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue