diff options
Diffstat (limited to 'components')
| -rw-r--r-- | components/header.js | 10 | ||||
| -rw-r--r-- | components/meta.js | 22 |
2 files changed, 22 insertions, 10 deletions
diff --git a/components/header.js b/components/header.js deleted file mode 100644 index 237f883..0000000 --- a/components/header.js +++ /dev/null @@ -1,10 +0,0 @@ -import Head from "next/head.js" - -export default function Header() { - <Head> - <meta name="description" content="Andrew's personal website" /> - <meta name="viewport" content="width=device-width, initial-scale=1"/> - <link rel="icon" href="/favicon.ico" /> - <title>Andrew Lee</title> - </Head> -} diff --git a/components/meta.js b/components/meta.js new file mode 100644 index 0000000..94d8f36 --- /dev/null +++ b/components/meta.js @@ -0,0 +1,22 @@ +import Head from "next/head.js" + +const Meta = ({title, description, keywords}) => { + return ( + <Head> + <meta name="description" content={description} /> + <meta name='keywords' content={keywords} /> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <meta charSet='utf-8' /> + <link rel="icon" href="/favicon.ico" /> + <title>{title} - Andrew Lee</title> + </Head> + ) +} + +Meta.defaultProps = { + title: 'Andrew Lee', + keywords: 'programming, personal website, webdev', + description: 'Andrew\'s Personal Website' +} + +export default Meta |
