1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 09:13:19 +01:00

move typekit id to env var

This commit is contained in:
Matthias Kretschmann 2021-09-12 23:16:30 +02:00
parent 3b62ddc121
commit 85667902af
Signed by: m
GPG Key ID: 606EEEF3C479A91F
6 changed files with 5 additions and 12 deletions

View File

@ -1 +1,2 @@
GATSBY_GITHUB_TOKEN=xxx
GATSBY_TYPEKIT_ID=xxx

View File

@ -13,8 +13,6 @@
addressbook: /matthias-kretschmann.vcf
bugs: https://github.com/kremalicious/portfolio/issues/new
typekitID: dtg3zui
# Analytics tools
matomoUrl: https://analytics.kremalicious.com
matomoSite: 2

View File

@ -5,7 +5,7 @@
padding: calc(var(--spacer) / 3);
font-size: var(--font-size-small);
font-weight: bold;
background: var(--brand-light);
background: var(--box-background-color);
}
.hostnameInfo p {

View File

@ -1,13 +1,12 @@
import React from 'react'
import { Helmet } from 'react-helmet'
import { useMeta } from '../../hooks/use-meta'
const TypekitScript = (typekitID) => (
const TypekitScript = () => (
<script>
{`
(function(d) {
var config = {
kitId: '${typekitID}',
kitId: '${process.env.GATSBY_TYPEKIT_ID}',
scriptTimeout: 3000,
async: true
},
@ -18,13 +17,10 @@ const TypekitScript = (typekitID) => (
)
export default function Typekit() {
const { typekitID } = useMeta()
return (
<Helmet>
<link rel="preconnect" href="https://use.typekit.net" />
{TypekitScript(typekitID)}
<TypekitScript />
</Helmet>
)
}

View File

@ -18,7 +18,6 @@ const query = graphql`
}
gpg
addressbook
typekitID
matomoUrl
matomoSite
allowedHosts

View File

@ -19,7 +19,6 @@
"gpg": "https://kretschmann.io/pub.gpg",
"addressbook": "/matthias-kretschmann.vcf",
"bugs": "https://github.com/kremalicious/portfolio/issues",
"typekitID": "dtg3zui",
"matomoUrl": "https://analytics.kremalicious.com",
"matomoSite": 2,
"allowedHosts": [