Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
How to set up head in Next.js?

I added some themekit CSS to Next.js head, but browser console raise warning, what is wrong?

Expected server HTML to contain a matching <head> in <div>.
const Layout = ({ children, isNavbarTransparent }: Props) => {
    return (
        <>
            <head>
                <link rel="stylesheet" href="themekit/css/bootstrap-grid.css" />
                <link rel="stylesheet" href="themekit/css/style.css" />
                <script src="themekit/scripts/jquery.min.js"></script>
                <script src="themekit/scripts/main.js"></script>
            </head>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You seem to be using HTML head. Instead use Head component from Next.js, as they suggest in their documentation.

We expose a built-in component for appending elements to the head of the page.

import Head from "next/head";

const Layout = ({ children, isNavbarTransparent }: Props) => {
  return (
    <>
      <Head>
        <link rel="stylesheet" href="themekit/css/bootstrap-grid.css" />
        <link rel="stylesheet" href="themekit/css/style.css" />
        <script src="themekit/scripts/jquery.min.js"></script>
        <script src="themekit/scripts/main.js"></script>
      </Head>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!