Title not updating in nextjs, tailwind css app

Alexander Zhao

Basically, the title of my website won't update even when I am using next/Head, and have the title tag included.

"use client";
import Head from 'next/head';

import { BsFillMoonStarsFill } from 'react-icons/bs'
import {AiFillTwitterCircle, AiFillLinkedin, AiFillInstagram, AiFillGithub} from 'react-icons/ai'
import Image from "next/image";
import intro from "../public/intro.png";
import { useState } from 'react';
import design from "../public/design.png"

export default function Home() {
  const[darkMode, setDarkMode] = useState(false); 
  return (
    <div className={darkMode ? "dark": ""}>
        <title>{"Alexander Zhao"}</title>
        <link rel="icon" href="/favion.ico" />



From docs

In Next.js 13.2, we announced a new Metadata API, allowing you to define metadata (e.g. title, meta, and link tags inside your HTML head element) by exporting a Metadata object from a layout or page.

// this is for typescript
import type { Metadata } from 'next'

export const metadata: Metadata = {
  title: "Alexander Zhao",

Collected from the Internet

Please contact javaer1[email protected] to delete if infringement.

edited at


Login to comment