From 62aeb5aff220fcf4815d48ad8a72b9306839d55a Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 19 Aug 2019 11:08:20 +0800 Subject: [PATCH] :memo: Add lang attribute to html --- package.json | 1 + site/theme/template/Layout/index.jsx | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 94985bfc2c..3038af73ac 100644 --- a/package.json +++ b/package.json @@ -166,6 +166,7 @@ "react-document-title": "^2.0.3", "react-dom": "^16.5.2", "react-github-button": "^0.1.11", + "react-helmet": "^6.0.0-beta", "react-highlight-words": "^0.16.0", "react-infinite-scroller": "^1.2.4", "react-intl": "^3.1.1", diff --git a/site/theme/template/Layout/index.jsx b/site/theme/template/Layout/index.jsx index fca7694c2c..aacc648ce4 100644 --- a/site/theme/template/Layout/index.jsx +++ b/site/theme/template/Layout/index.jsx @@ -3,6 +3,7 @@ import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import { enquireScreen } from 'enquire-js'; import { IntlProvider } from 'react-intl'; +import { Helmet } from 'react-helmet'; import 'moment/locale/zh-cn'; import { ConfigProvider } from 'antd'; import LogRocket from 'logrocket'; @@ -110,18 +111,19 @@ export default class Layout extends React.Component { const { children, ...restProps } = this.props; const { appLocale } = this.state; return ( - - -
-
- {children} -
-
-
+ <> + + + + + +
+
+ {children} +
+
+
+ ); } }