Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
1:1  Error: `<Document />` from `next/document` should not be imported outside of `pages/_document.js`. See: https://nextjs.org/docs/messages/no-document-import-in-page  @next/next/no-document-import-in-page
  • Loading branch information
rNLKJA committed Jan 1, 2024
1 parent 8e2a641 commit 2082779
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 78 deletions.
3 changes: 0 additions & 3 deletions components/specific/SEOHead.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { Head } from "next/document";
export function SEOHead() {
return (
<Head>
<title>Pawsibly Rin</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<meta
name="description"
content="Personal Profile website for Rin Huang"
Expand Down Expand Up @@ -66,7 +64,6 @@ export function SEOHead() {

<link rel="canonical" href="https://rin.contact" />
<link rel="alternate" hreflang="x" href="https://x.rin.contact/" />
<title>Pawsibly Rin</title>

<meta property="highschool" content="安顺第二高级中学" />
<meta property="高中" content="安顺第二高级中学" />
Expand Down
77 changes: 2 additions & 75 deletions pages/_document.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// pages/_document.js
import Document, { Html, Head, Main, NextScript } from "next/document";
import SEOHead from "@/components/specific/SEOHead"; // Import the component

class MyDocument extends Document {
render() {
Expand All @@ -15,78 +17,3 @@ class MyDocument extends Document {
}

export default MyDocument;

const SEOHead = () => {
return (
<Head>
<meta
name="description"
content="Personal Profile website for Rin Huang"
/>
<meta name="author-full-name" content="Sunchuangyu Huang" />
<meta name="author-prefer-name" content="Rin Huang" />
<meta name="author-chinese-name" content="黄孙创宇" />
<meta name="author-email" content="huangsunchuangyu@gmail.com" />
<meta name="author-github" content="https://github/rNLKJA" />
<meta
name="author-linkedin"
content="https://www.linkedin.com/in/sunchuangyuhuang/"
/>
<meta name="author-website" content="https://rin.contact" />
<meta
name="instagram"
content="https://www.instagram.com/chuangyu_hscy"
/>
<meta
name="xiaohongshu"
content="https://www.xiaohongshu.com/user/profile/5ddb3cf2000000000100bcab"
/>

<link rel="icon" href="/favicon.ico" />

<meta property="og:type" content="website" />
<meta property="og:url" content="https://rin.contact/" />
<meta property="og:title" content="rNLKJA's Portfolio" />
<meta
property="og:description"
content="Explore my data science projects and read my latest tech insights."
/>
<meta property="og:image" content="https://rin.contact/meta-image.png" />

<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify({
"@context": "http://schema.org",
"@type": "Person",
name: "rNLKJA",
url: "https://rin.contact",
sameAs: [
"https://github.com/rNLKJA",
"https://linkedin.com/in/sunchuangyuhuang",
"https://www.instagram.com/chuangyu_hscy/",
],
jobTitle: "Master of Data Science",
worksFor: {
"@type": "Organization",
name: "University of Melbourne",
},
alumniOf: "University of Melbourne",
description:
"rNLKJA - Data Scientist, Programmer, and Tech Enthusiast. Explore my portfolio, blog posts, and data science projects.",
}),
}}
/>

<link rel="canonical" href="https://rin.contact" />
<link rel="alternate" hreflang="x" href="https://x.rin.contact/" />

<meta property="highschool" content="安顺第二高级中学" />
<meta property="高中" content="安顺第二高级中学" />
<meta property="college" content="trinity college" />
<meta property="姓名" content="Sunchuangyu Huang" />

<meta charSet="utf-8" />
</Head>
);
};

0 comments on commit 2082779

Please sign in to comment.