Skip to content

Commit

Permalink
Add tracking header (#726)
Browse files Browse the repository at this point in the history
* Fix initial CI issue

* Linting

* Fix naming error

* Add tracking snippets

* Fix issues badly, need to work out why theme is empty

* Fix components used on contributing page

* Roll back styled-components to v5

* Add option to track

* Prettier

---------

Co-authored-by: Owen Niblock <[email protected]>
Co-authored-by: Owen Niblock <[email protected]>
  • Loading branch information
3 people authored Apr 19, 2024
1 parent bce195c commit 5fe6bf8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions theme/src/components/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ function Head(props) {
<meta property="og:description" content={description} />
<meta property="og:image" content={siteMetadata.imageUrl} />
<meta property="twitter:card" content="summary_large_image" />
{siteMetadata.primerTracking ? (
<>
<meta name="ha-url" content="https://collector.githubapp.com/primer/collect" />
<script src="https://analytics.githubassets.com/hydro-marketing.min.js"></script>
</>
) : null}
</Helmet>
)
}
Expand Down
10 changes: 5 additions & 5 deletions theme/src/components/live-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ function LiveCode({code, language, highlight, noinline, metastring}) {
onChange={handleChange}
theme={githubTheme}
ignoreTabKey={true}
padding={theme.space[3]}
padding={theme?.space[3]}
style={{
fontFamily: theme.fonts.mono,
fontFamily: theme?.fonts.mono,
fontSize: '85%',
borderBottomLeftRadius: theme.radii[2],
borderBottomRightRadius: theme.radii[2],
borderBottomLeftRadius: theme?.radii[2],
borderBottomRightRadius: theme?.radii[2],
border: '1px solid',
borderTop: 0,
borderColor: theme.colors.border.default,
borderColor: theme?.colors.border.default,
}}
/>
</LineHighlighter>
Expand Down

0 comments on commit 5fe6bf8

Please sign in to comment.