Skip to content

Commit

Permalink
chore(docs): 📝 add og tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnaveen committed Sep 23, 2023
1 parent 76315b7 commit ce89845
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/theme.config.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useRouter } from 'next/router'
import { DocsThemeConfig } from 'nextra-theme-docs'
import React from 'react'

Expand All @@ -10,6 +11,34 @@ const config: DocsThemeConfig = {
project: {
link: 'https://github.com/mcnaveen/cart',
},
useNextSeoProps() {
const { asPath } = useRouter()
if (asPath !== '/') {
return {
titleTemplate: '%s – Cart'
}
}
},
head: (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="Cart - An Open Source headless cart management library" />
<meta property="og:description" content="$ npm install cart" />

<meta property="og:type" content="website" />
<meta property="og:url" content="https://cart.js.org/" />
<meta property="og:title" content="Cart - An Open Source headless cart management library" />
<meta property="og:description" content="$ npm install cart" />
<meta property="og:image" content="https://raw.githubusercontent.com/mcnaveen/cart/HEAD/image/cover.png" />

<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://cart.js.org/" />
<meta property="twitter:title" content="Cart - An Open Source headless cart management library" />
<meta property="twitter:description" content="$ npm install cart" />
<meta property="twitter:image" content="https://raw.githubusercontent.com/mcnaveen/cart/HEAD/image/cover.png" />

</>
)
}

export default config

0 comments on commit ce89845

Please sign in to comment.