Clear warning about styleSheet declare in Page level, move it to _document.js
This commit is contained in:
parent
0be9ae3ff3
commit
ea1c149a1f
@ -6,12 +6,6 @@ export default function Layout({children, home}) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Head>
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin/>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap"
|
|
||||||
rel="stylesheet"/>
|
|
||||||
</Head>
|
|
||||||
<main className="markdown-rendered theme-light">{children}</main>
|
<main className="markdown-rendered theme-light">{children}</main>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
18
pages/_document.js
Normal file
18
pages/_document.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { Html, Head, Main, NextScript } from 'next/document'
|
||||||
|
|
||||||
|
export default function Document() {
|
||||||
|
return (
|
||||||
|
<Html>
|
||||||
|
<Head>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="true"/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap"
|
||||||
|
rel="stylesheet"/>
|
||||||
|
</Head>
|
||||||
|
<body>
|
||||||
|
<Main />
|
||||||
|
<NextScript />
|
||||||
|
</body>
|
||||||
|
</Html>
|
||||||
|
)
|
||||||
|
}
|
@ -9,12 +9,6 @@ export default function Home({content, graphdata, filenames, directoryTree, ...p
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout home>
|
<Layout home>
|
||||||
<Head>
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin/>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap"
|
|
||||||
rel="stylesheet"/>
|
|
||||||
</Head>
|
|
||||||
<section>
|
<section>
|
||||||
{/*<BasicTree directoryTree/>*/}
|
{/*<BasicTree directoryTree/>*/}
|
||||||
<div dangerouslySetInnerHTML={{__html: content.data}}/>
|
<div dangerouslySetInnerHTML={{__html: content.data}}/>
|
||||||
|
Loading…
Reference in New Issue
Block a user