Skip to content

Commit

Permalink
chore: 同步 layouts 组件
Browse files Browse the repository at this point in the history
  • Loading branch information
紫升 committed Sep 11, 2023
1 parent cefbf37 commit 280b83d
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .dumi/theme/layouts/DocLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
useSiteData,
} from 'dumi';
import Content from 'dumi/theme-default/slots/Content';
import ContentFooter from 'dumi/theme-default/slots/ContentFooter';
import Features from 'dumi/theme-default/slots/Features';
import Footer from 'dumi/theme-default/slots/Footer';
import Header from 'dumi/theme-default/slots/Header';
Expand Down Expand Up @@ -64,8 +65,11 @@ const DocLayout: FC = () => {
{fm.description && (
<meta property="og:description" content={fm.description} />
)}
{fm.keywords && fm.keywords.map(keyword => (<meta key={keyword} property="article:tag" content={keyword}></meta>))}
<link rel="canonical" href={hostname + pathname}></link>
{fm.keywords &&
fm.keywords.map((keyword) => (
<meta key={keyword} property="article:tag" content={keyword}></meta>
))}
{hostname && <link rel="canonical" href={hostname + pathname} />}
</Helmet>
<Header />
<Hero />
Expand All @@ -88,15 +92,18 @@ const DocLayout: FC = () => {
<main>
{showSidebar && <Sidebar />}
<Content>
{outlet}
<Adsense
className="adsbygoogle"
style={{ display: "block" }}
data-ad-client="ca-pub-7029815294762181"
data-ad-slot="6412968057"
data-ad-format="auto"
data-full-width-responsive="true"
/>
<article>
{outlet}
<Adsense
className="adsbygoogle"
style={{ display: "block" }}
data-ad-client="ca-pub-7029815294762181"
data-ad-slot="6412968057"
data-ad-format="auto"
data-full-width-responsive="true"
/>
</article>
<ContentFooter />
<Footer />
</Content>
{fm.toc === 'content' && (
Expand Down

0 comments on commit 280b83d

Please sign in to comment.