Skip to content

Commit

Permalink
Add custom head (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
dipree authored Apr 17, 2024
1 parent c74fbf4 commit 001fb1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/CustomHead.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'
import Helmet from 'react-helmet'

export default function CustomHead() {
return (
<Helmet>
<meta name="ha-url" content="https://collector.githubapp.com/primer/collect" />
<script src="https://analytics.githubassets.com/hydro-marketing.min.js"></script>
</Helmet>
)
}
2 changes: 2 additions & 0 deletions src/components/Layout.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import {Box, ThemeProvider} from '@primer/react'
import {Head, Header} from '@primer/gatsby-theme-doctocat'
import CustomHead from './CustomHead'
import '@primer/css/layout/index.scss'
import React from 'react'

export default function Layout({pageContext, children, colorMode}) {
return (
<ThemeProvider colorMode={colorMode || 'night'} nightScheme="dark_dimmed">
<Head title={pageContext.frontmatter.title} description={pageContext.frontmatter.description} />
<CustomHead />
<Header isSearchEnabled={false} />
<Box as={'main'} sx={{backgroundColor: 'canvas.default', color: 'fg.default'}}>
{children}
Expand Down

0 comments on commit 001fb1c

Please sign in to comment.