Skip to content

Commit

Permalink
Support Custom Font (Google Font)
Browse files Browse the repository at this point in the history
  • Loading branch information
stayingcool committed Aug 23, 2021
1 parent d6a6114 commit d808807
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// pages/_document.js

import Document, { Html, Head, Main, NextScript } from "next/document";

class MyDocument extends Document {
render() {
return (
<Html>
<Head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="true" />
<link
href="https://fonts.googleapis.com/css2?family=Merienda&family=Montserrat+Alternates&display=swap"
rel="stylesheet"
></link>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
}

export default MyDocument;
5 changes: 5 additions & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
font-family: "Montserrat Alternates", sans-serif;
font-family: "Merienda", cursive;
}

0 comments on commit d808807

Please sign in to comment.