Skip to content

Commit 5a8e052

Browse files
committed
Add description tag
1 parent 92df81b commit 5a8e052

File tree

17 files changed

+49
-17
lines changed

17 files changed

+49
-17
lines changed

pages/_app.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default function MyApp({ Component, pageProps, router }: AppProps) {
3333
<Head>
3434
<title>{router.pathname.substring(1).replace(/^\w/, w => w.toUpperCase())} | Hu Tao</title>
3535
<link rel="icon" href="/favicon.ico" />
36+
<meta http-httpEquiv="content-language" content="en-us"></meta>
3637
</Head>
3738

3839
<div className="w-full">

pages/artifacts/[artifact].tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@ interface Props {
1616

1717
export default function ArtifactWebpage({ artifact, location, guides }: Props & { location: string }) {
1818
const color = getStarColor(Math.max(...(artifact.levels ?? [1])))
19+
const desc = `The ${artifact.name} artifact set${artifact.artis?.length ?? 0 > 0 ?
20+
` consists of ${artifact.artis?.length} pieces and is available in ${joinMulti(artifact.levels?.map(l => `${l}`) ?? [])} star variants. \nIt also has` :
21+
" has"} ${joinMulti(artifact.bonuses?.map(b => `a ${b.count} piece set bonus: "${clean(b.desc)}"`) ?? [])}.`
1922

2023
return (
2124
<Main>
2225
<Head>
2326
<title>{artifact.name} | Hu Tao</title>
2427
<meta name="twitter:card" content="summary" />
2528
<meta property="og:title" content={`${artifact.name} | Hu Tao`} />
26-
<meta property="og:description" content={`The ${artifact.name} artifact set${artifact.artis?.length ?? 0 > 0 ?
27-
` consists of ${artifact.artis?.length} pieces and is available in ${joinMulti(artifact.levels?.map(l => `${l}`) ?? [])} star variants. \nIt also has` :
28-
" has"} ${joinMulti(artifact.bonuses?.map(b => `a ${b.count} piece set bonus: "${clean(b.desc)}"`) ?? [])}.`} />
29+
<meta property="og:description" content={desc} />
30+
<meta property="description" content={desc} />
2931
{artifact.artis?.[0]?.icon && <meta property="og:image" content={getIconPath(artifact.artis[0].icon)} />}
3032
</Head>
3133
<h2 className="font-semibold">

pages/artifacts/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ export default function Artifacts(props: Props & { location: string }) {
1818

1919
const [starFilter, setStarFilter] = useState(0)
2020

21+
const desc = `View set bonuses and description of the ${props.artifacts.length} different artifact sets in Genshin Impact.`
2122
return (
2223
<Main>
2324
<Head>
2425
<title>Artifacts | Hu Tao</title>
2526
<meta name="twitter:card" content="summary" />
2627
<meta property="og:title" content="Artifacts | Hu Tao" />
27-
<meta property="og:description" content={`View set bonuses and description of the ${props.artifacts.length} different artifact sets in Genshin Impact.`} />
28+
<meta property="og:description" content={desc} />
29+
<meta property="description" content={desc} />
2830
</Head>
2931

3032
<h1 className="text-5xl font-bold pb-2">

pages/characters/[char].tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default function CharacterWebpage({ char, location, characterCurves, cost
3535
<meta name="twitter:card" content="summary" />
3636
<meta property="og:title" content={`${char.name} | Hu Tao`} />
3737
<meta property="og:description" content={getDescription(char, charElems, characterCurves)} />
38+
<meta property="description" content={getDescription(char, charElems, characterCurves)} />
3839
{char.icon && <meta property="og:image" content={getIconPath(char.icon)} />}
3940
</Head>
4041
<h2 className="font-semibold">

pages/characters/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ export default function Characters(props: Props & { location: string }) {
2424
const [elementFilter, setElementFilter] = useState(defaultElements)
2525
const [weaponFilter, setWeaponFilter] = useState(defaultWeapons)
2626

27+
const desc = `View talent/ascension material, constellations and more of the ${props.characters.length} different characters in Genshin Impact.`
2728
return (
2829
<Main>
2930
<Head>
3031
<title>Characters | Hu Tao</title>
3132
<meta name="twitter:card" content="summary" />
3233
<meta property="og:title" content="Characters | Hu Tao" />
33-
<meta property="og:description" content={`View talent/ascension material, constellations and more of the ${props.characters.length} different characters in Genshin Impact.`} />
34+
<meta property="og:description" content={desc} />
35+
<meta property="description" content={desc} />
3436
</Head>
3537

3638
<h1 className="text-5xl font-bold pb-2">

pages/enemies/[enemy].tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ interface Props {
1919
export default function EnemyWebpage({ enemy, location, guides }: Props & { location: string }) {
2020
const color = getStarColor(1)
2121

22+
const desc = `${enemy.name}${enemy.type ? ` (${enemy.type})` : ""}${enemy.kind ? ` is a ${enemy.kind}` : " is an enemy"} in Genshin Impact.${enemy.resistance ? " Click to find out their resistances!" : ""}`
2223
return (
2324
<Main>
2425
<Head>
2526
<title>{enemy.name} | Hu Tao</title>
2627
<meta name="twitter:card" content="summary" />
2728
<meta property="og:title" content={`${enemy.name} | Hu Tao`} />
28-
<meta property="og:description" content={`${enemy.name}${enemy.type ? ` (${enemy.type})` : ""}${enemy.kind ? ` is a ${enemy.kind}` : " is an enemy"} in Genshin Impact.${enemy.resistance ? " Click to find out their resistances!" : ""}`} />
29+
<meta property="og:description" content={desc} />
30+
<meta property="description" content={desc} />
2931
{enemy.icon && <meta property="og:image" content={getIconPath(enemy.icon)} />}
3032
</Head>
3133
<h2 className="font-semibold">

pages/enemies/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ export default function Enemies(props: Props & { location: string }) {
2323
const [kindFilter, setKindFilter] = useState(defaultKinds)
2424
const [typeFilter, setTypeFilter] = useState(defaultTypes)
2525

26+
const desc = `View description, classification and resistances of the ${props.enemies.length} different enemies in Genshin Impact.`
2627
return (
2728
<Main>
2829
<Head>
2930
<title>Enemies | Hu Tao</title>
3031
<meta name="twitter:card" content="summary" />
3132
<meta property="og:title" content="Enemies | Hu Tao" />
32-
<meta property="og:description" content={`View description, classification and resistances of the ${props.enemies.length} different enemies in Genshin Impact.`} />
33+
<meta property="og:description" content={desc} />
34+
<meta property="description" content={desc} />
3335
</Head>
3436

3537
<h1 className="text-5xl font-bold pb-2">

pages/guides/[category].tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ interface Props {
1111
}
1212

1313
export default function CategoryWebpage({ guide, location }: Props & { location: string }) {
14+
const desc = `View ${guide.pages.length} ${guide.name} guides`
1415
return (
1516
<Main>
1617
<Head>
1718
<title>{guide.name} | Hu Tao</title>
1819
<meta name="twitter:card" content="summary" />
1920
<meta property="og:title" content={`${guide.name} | Hu Tao`} />
20-
<meta property="og:description" content={`View ${guide.pages.length} ${guide.name} guides`} />
21+
<meta property="og:description" content={desc} />
22+
<meta property="description" content={desc} />
2123
</Head>
2224
<h2 className="font-semibold">
2325
<FormattedLink href="/guides/" location={location} className="font-semibold text-lg">

pages/guides/[category]/[guide].tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ export default function GuideWebpage({ guide, pageNumber, location }: Props & {
1919
const nextPage = guide.pages[pageNumber + 1]
2020
const prevPage = guide.pages[pageNumber - 1]
2121

22+
const desc = `View ${removeBrackets(page.name)} guide by ${page.credits}${page.url && page.url.startsWith("https://youtu.be/") ? " (video available!)" : ""}. \n${page.desc ? clean(page.desc) : ""}`.trim()
2223
return (
2324
<Main>
2425
<Head>
2526
<title>{page.name} | Hu Tao</title>
2627
<meta name="twitter:card" content={page.img ? "summary_large_image" : "summary"} />
2728
<meta property="og:title" content={`${page.name} | Hu Tao`} />
28-
<meta property="og:description" content={`View ${page.name} guide by ${page.credits}${page.url && page.url.startsWith("https://youtu.be/") ? " (video available!)" : ""}. \n${page.desc ? clean(page.desc) : ""}`.trim()} />
29+
<meta property="og:description" content={desc} />
30+
<meta property="description" content={desc} />
2931
{page.img && <meta property="og:image" content={getIconPath(page.img)} />}
3032
</Head>
3133
<h2 className="font-semibold">

pages/guides/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ interface Props {
1010
}
1111

1212
export default function Guides(props: Props & { location: string }) {
13+
const desc = "Click to find our currently available guides and routes for Genshin Impact."
1314
return (
1415
<Main>
1516
<Head>
1617
<title>Guides | Hu Tao</title>
1718
<meta name="twitter:card" content="summary" />
1819
<meta property="og:title" content="Guides | Hu Tao" />
19-
<meta property="og:description" content="Click to find our currently available guides and routes for Genshin Impact." />
20+
<meta property="og:description" content={desc} />
21+
<meta property="description" content={desc} />
2022
</Head>
2123

2224
<h1 className="text-5xl font-bold pb-2">

0 commit comments

Comments
 (0)