Skip to content

Commit

Permalink
feat: 优化head title
Browse files Browse the repository at this point in the history
  • Loading branch information
neo committed Aug 10, 2023
1 parent c8257ee commit 38feb3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .dumi/theme/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const Layout: React.FC<IRouteComponentProps> = ({ children, location }) => {
locale,
} = useContext(context);

const { mode, repository, logo } = config
const { mode, repository, logo, title } = config

const { pathname } = useLocation();

Expand Down Expand Up @@ -129,8 +129,8 @@ const Layout: React.FC<IRouteComponentProps> = ({ children, location }) => {
}}
>
<Helmet>
{meta.title && <title>{meta.title}</title>}
{meta.title && <meta property="og:title" content={meta.title} />}
{meta.title && <title>{meta.title + ' - ' + title}</title>}
{meta.title && <meta property="og:title" content={meta.title + ' - ' + title} />}
{meta.description && <meta name="description" content={meta.description} />}
{meta.description && (
<meta property="og:description" content={meta.description} />
Expand Down

0 comments on commit 38feb3e

Please sign in to comment.