Improve SEO
This commit is contained in:
@@ -13,7 +13,10 @@ import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
||||
import {
|
||||
BattlesuitData,
|
||||
battlesuitFeatures,
|
||||
BattlesuitSkillGroup,
|
||||
battlesuitTypes,
|
||||
valkyries,
|
||||
} from '../../../lib/honkai3rd/battlesuits'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../server/i18n'
|
||||
import {
|
||||
@@ -22,6 +25,8 @@ import {
|
||||
} from '../../../server/data/honkai3rd/battlesuits'
|
||||
import { translate, useTranslation } from '../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { capitalize } from '../../../lib/string'
|
||||
|
||||
interface BattlesuitShowPageProps {
|
||||
battlesuit: BattlesuitData
|
||||
@@ -37,8 +42,44 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
||||
battlesuit.name
|
||||
)
|
||||
|
||||
const { label: valkyrieLabel, krLabel } = valkyries.find(
|
||||
(aValkyrie) => aValkyrie.value === battlesuit.valkyrie
|
||||
) || { label: battlesuit.valkyrie, krLabel: battlesuit.valkyrie }
|
||||
|
||||
const valkyrieName = translate(locale, { 'ko-KR': krLabel }, valkyrieLabel)
|
||||
|
||||
const battlesuitType = battlesuitTypes.find(
|
||||
(aType) => aType.value === battlesuit.type
|
||||
)
|
||||
const battlesuitTypeLabel = battlesuitType
|
||||
? translate(
|
||||
locale,
|
||||
{ 'ko-KR': battlesuitType.krLabel },
|
||||
battlesuitType.label
|
||||
)
|
||||
: capitalize(battlesuit.type)
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: ${battlesuitName} - Abyss Lab`}
|
||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||
'battlesuit-show.battlesuit'
|
||||
)} / ${valkyrieName} / ${battlesuitTypeLabel} / ${battlesuit.features
|
||||
.map((feature) => {
|
||||
const featureData = battlesuitFeatures.find(
|
||||
(aFeature) => aFeature.value === feature
|
||||
)
|
||||
if (featureData == null) {
|
||||
return feature
|
||||
}
|
||||
|
||||
const { label, krLabel } = featureData
|
||||
|
||||
return translate(locale, { 'ko-KR': krLabel }, label)
|
||||
})
|
||||
.join(', ')}`}
|
||||
/>
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -17,6 +17,7 @@ import { useRouter } from 'next/router'
|
||||
import { NextPageContext } from 'next'
|
||||
import { getI18NProps } from '../../../server/i18n'
|
||||
import { translate, useTranslation } from '../../../lib/i18n'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
|
||||
type BattlesuitListItemData = Pick<
|
||||
BattlesuitData,
|
||||
@@ -77,6 +78,12 @@ const BattlesuitListPage = ({ battlesuits }: BattlesuitListPageProps) => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
||||
'breadcrumb.battlesuits'
|
||||
)} - Abyss Lab`}
|
||||
description={t('battlesuits-list.description')}
|
||||
/>
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -12,6 +12,8 @@ import { getElfById, listElfs } from '../../../server/data/honkai3rd/elfs'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../server/i18n'
|
||||
import { translate, useTranslation } from '../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
import { battlesuitFeatures } from '../../../lib/honkai3rd/battlesuits'
|
||||
interface ElfShowPageProps {
|
||||
elf: ElfData
|
||||
}
|
||||
@@ -24,6 +26,25 @@ const ElfShowPage = ({ elf }: ElfShowPageProps) => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: ${elfName} - Abyss Lab`}
|
||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||
'elfs-show.elf'
|
||||
)} / ${'⭐'.repeat(elf.baseRank)} / ${elf.features
|
||||
.map((feature) => {
|
||||
const featureData = battlesuitFeatures.find(
|
||||
(aFeature) => aFeature.value === feature
|
||||
)
|
||||
if (featureData == null) {
|
||||
return feature
|
||||
}
|
||||
|
||||
const { label, krLabel } = featureData
|
||||
|
||||
return translate(locale, { 'ko-KR': krLabel }, label)
|
||||
})
|
||||
.join(', ')}`}
|
||||
/>
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ElfData } from '../../../lib/honkai3rd/elfs'
|
||||
import { getI18NProps } from '../../../server/i18n'
|
||||
import { listElfs } from '../../../server/data/honkai3rd/elfs'
|
||||
import { useTranslation } from '../../../lib/i18n'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
|
||||
interface ElfListPageProps {
|
||||
elfs: Pick<ElfData, 'id' | 'name' | 'krName'>[]
|
||||
@@ -19,6 +20,13 @@ const ElfListPage = ({ elfs }: ElfListPageProps) => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
||||
'breadcrumb.elfs'
|
||||
)} - Abyss Lab`}
|
||||
description={t('elfs-list.description')}
|
||||
/>
|
||||
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -10,6 +10,7 @@ import PageLink from '../../components/atoms/PageLink'
|
||||
import SquareImageBox from '../../components/atoms/SquareImageBox'
|
||||
import { mdiGithub } from '@mdi/js'
|
||||
import { Icon } from '@mdi/react'
|
||||
import Head from '../../components/atoms/Head'
|
||||
|
||||
const bannerValkyries = [
|
||||
'kiana',
|
||||
@@ -43,6 +44,10 @@ const Honkai3rdIndexPage = () => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: Home - Abyss Lab`}
|
||||
description={t('index.description')}
|
||||
/>
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
listStigmataSet,
|
||||
} from '../../../server/data/honkai3rd/stigmata'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
|
||||
interface StigmataListPageProps {
|
||||
stigmataDataList: Pick<StigmataData, 'id' | 'name' | 'rarity' | 'krName'>[]
|
||||
@@ -38,6 +39,12 @@ const StigmataListPage = ({
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
||||
'breadcrumb.stigmata'
|
||||
)} - Abyss Lab`}
|
||||
description={t('stigmata-list.description')}
|
||||
/>
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -23,6 +23,7 @@ import { VersionData } from '../../../lib/honkai3rd/versions'
|
||||
import { generateI18NPaths, getI18NProps } from '../../../server/i18n'
|
||||
import { translate, useTranslation } from '../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
|
||||
interface VersionShowPageProps {
|
||||
versionData: VersionData
|
||||
@@ -42,6 +43,26 @@ const VersionShowPage = ({
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: v${
|
||||
versionData.version
|
||||
} - Abyss Lab`}
|
||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||
'versions.version'
|
||||
)} / ${t('versions.new-battlesuits')}: ${battlesuits
|
||||
.map((battlesuit) => {
|
||||
return translate(
|
||||
locale,
|
||||
{ 'ko-KR': battlesuit.krName },
|
||||
battlesuit.name
|
||||
)
|
||||
})
|
||||
.join(',')} / ${t('versions.new-weapons')}: ${weapons
|
||||
.map((weapon) => {
|
||||
return translate(locale, { 'ko-KR': weapon.krName }, weapon.name)
|
||||
})
|
||||
.join(',')}`}
|
||||
/>
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -23,6 +23,7 @@ import { getI18NProps } from '../../../server/i18n'
|
||||
import { NextPageContext } from 'next'
|
||||
import { useTranslation, translate } from '../../../lib/i18n'
|
||||
import { useRouter } from 'next/router'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
|
||||
interface VersionIndexPageProps {
|
||||
versionDataList: VersionData[]
|
||||
@@ -44,6 +45,13 @@ const VersionIndexPage = ({
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
||||
'breadcrumb.versions'
|
||||
)} - Abyss Lab`}
|
||||
description={t('versions.list-page-description')}
|
||||
/>
|
||||
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
} from '../../../server/data/honkai3rd/weapons'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useTranslation, translate } from '../../../lib/i18n'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
|
||||
interface WeaponShowPageProps {
|
||||
weapon: WeaponData
|
||||
@@ -22,9 +23,18 @@ const WeaponShowPage = ({ weapon }: WeaponShowPageProps) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const weaponName = translate(locale, { 'ko-KR': weapon.krName }, weapon.name)
|
||||
const weaponCategory = t(`weapons-show.${weapon.category}`)
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: ${weaponName} - Abyss Lab`}
|
||||
description={`${t('breadcrumb.honkai-3rd')} ${t(
|
||||
'weapons-show.weapon'
|
||||
)} / ${'⭐'.repeat(weapon.rarity)} / ${weaponCategory} / ATK : ${
|
||||
weapon.atk
|
||||
} / CRT : ${weapon.crt}`}
|
||||
/>
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
@@ -51,7 +61,7 @@ const WeaponShowPage = ({ weapon }: WeaponShowPageProps) => {
|
||||
|
||||
<Card mb={3}>
|
||||
<Box p={2} sx={{ borderBottom: 'default' }}>
|
||||
{t(`weapons-show.${weapon.category}`)}
|
||||
{weaponCategory}
|
||||
</Box>
|
||||
<Box p={2} sx={{ borderBottom: 'default' }}>
|
||||
{'⭐'.repeat(weapon.rarity)}
|
||||
|
||||
@@ -12,6 +12,7 @@ import WeaponCard from '../../../components/molecules/WeaponCard'
|
||||
import { getI18NProps } from '../../../server/i18n'
|
||||
import { NextPageContext } from 'next'
|
||||
import { useTranslation, translate } from '../../../lib/i18n'
|
||||
import Head from '../../../components/atoms/Head'
|
||||
|
||||
type WeaponListItemData = Pick<
|
||||
WeaponData,
|
||||
@@ -56,6 +57,12 @@ const WeaponListPage = ({ weaponDataList }: WeaponListPageProps) => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Head
|
||||
title={`${t('breadcrumb.honkai-3rd')}: ${t(
|
||||
'breadcrumb.weapons'
|
||||
)} - Abyss Lab`}
|
||||
description={t('weapons-list.description')}
|
||||
/>
|
||||
<Honkai3rdNavigator />
|
||||
|
||||
<Box p={3}>
|
||||
|
||||
@@ -3,10 +3,12 @@ import { Box, Text } from '@theme-ui/components'
|
||||
import PageLink from '../components/atoms/PageLink'
|
||||
import Image from 'next/image'
|
||||
import RootNavigator from '../components/organisms/RootNavigator'
|
||||
import Head from '../components/atoms/Head'
|
||||
|
||||
const IndexPage = () => {
|
||||
return (
|
||||
<Box>
|
||||
<Head title='Abyss Lab - Unofficial Honkai3rd/Genshin Wiki' />
|
||||
<RootNavigator />
|
||||
<Box sx={{ p: 3 }}>
|
||||
<Box mb={4}>
|
||||
|
||||
Reference in New Issue
Block a user