I'm trying to link a stylesheet that will style the html
and body
elements in my app. At the moment I've tried using the <Head />
component but this is only sent with the component it's imported inside, so other routes don't get the stylesheet.
export default function Home() {
return (
<>
<Head>
<link rel='stylesheet' href="main.css" />
</Head>
...
</>
)
}
Can I import this globally? Thanks.
Figured it out:
_app.tsx
file in/routes
(this wraps the entire app), and add the<Head />
component within this:main.css
in/static
Then the stylesheet goes to all routes.