Created
May 5, 2021 17:46
-
-
Save gdhardy1/45bf03b57930b4471ec8f943a60b2c3f to your computer and use it in GitHub Desktop.
Setting head components in gatsby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const React = require("react") | |
exports.onRenderBody = ({ setHeadComponents }) => { | |
setHeadComponents([ | |
<link | |
href="https://cloud.typography.com/path/to/your/file.css" | |
rel="stylesheet" | |
type="text/css" | |
media="print" | |
onload="this.media='all'" | |
referrerpolicy="origin" | |
/>, | |
]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment