Skip to content

Commit 128f6af

Browse files
committed
feat: update SEO
1 parent 34bb9ff commit 128f6af

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/components/Html.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class Html extends React.Component {
1818
static propTypes = {
1919
title: PropTypes.string.isRequired,
2020
description: PropTypes.string.isRequired,
21+
keywords: PropTypes.string.isRequired,
22+
author: PropTypes.string.isRequired,
2123
styles: PropTypes.arrayOf(
2224
PropTypes.shape({
2325
id: PropTypes.string.isRequired,
@@ -35,14 +37,16 @@ class Html extends React.Component {
3537
};
3638

3739
render() {
38-
const {title, description, styles, scripts, app, children} = this.props;
40+
const {title, description, keywords, author, styles, scripts, app, children} = this.props;
3941
return (
4042
<html className="no-js" lang="en">
4143
<head>
4244
<meta charSet="utf-8" />
4345
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
4446
<title>{title}</title>
4547
<meta name="description" content={description} />
48+
<meta name="keywords" content={keywords} />
49+
<meta name="author" content={author} />
4650
<meta name="viewport" content="width=device-width, initial-scale=1" />
4751
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
4852
{styles.map(style => (

src/server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ app.get('*', async (req, res, next) => {
178178
const data = {
179179
title: 'React Dashboard',
180180
description:
181-
'React Dashboard Starter project based on react-router 4, redux, graphql, bootstrap',
181+
'React Admin Starter project based on react-router 4, redux, graphql, bootstrap 4',
182+
keywords: 'react dashboard, react admin template, react dashboard open source, react starter, react admin, react themes, react dashboard template',
183+
author: 'Flatlogic LLC'
182184
};
183185
data.styles = [{ id: 'css', cssText: [...css].join('') }];
184186
data.scripts = [assets.vendor.js, assets.client.js];

0 commit comments

Comments
 (0)