Files
web_6ea_educo/site1/utils/seoHelper.ts
T

156 lines
6.5 KiB
TypeScript

import type { ParsedRouteParams } from './dataHelper'
import { getShortRegionName } from './dataHelper'
export function generateSeoMeta(parsed: ParsedRouteParams, siteName = '로열클래스 1:1 과외', siteDomain = 'https://aeseo.cloud') {
const { sido, sigungu, dong, shortRegionName, grade, subjectName, targetTerm, fullKeyword } = parsed
const regionTitle = shortRegionName || getShortRegionName(sido, dong)
const pageTitle = `${regionTitle} ${grade} ${subjectName} 과외 | ${dong} 내신·수능 1:1 맞춤수업 - ${siteName}`
const pageDescription = `${sido} ${sigungu} ${dong} 지역 초·중·고 ${grade} ${subjectName} 1:1 전문 과외. 인근 학교별 기출 족보 완벽 분석, 서술형 감점 방지, 취약 개념 클리닉 및 맞춤 학습 플래너 제공. 지금 ${dong} 무료 학습 진단 및 모의수업을 신청하세요.`
// 표준 Canonical URL
const canonicalUrl = `${siteDomain}/${encodeURIComponent(dong)}/${encodeURIComponent(grade)}/${encodeURIComponent(subjectName)}`
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'EducationalOrganization',
'name': siteName,
'url': siteDomain,
'description': pageDescription,
'areaServed': {
'@type': 'AdministrativeArea',
'name': `${sido} ${sigungu} ${dong}`
}
},
{
'@type': 'Course',
'name': `${dong} ${grade} ${subjectName} 1:1 맞춤 과외`,
'description': `${dong} 인근 학교 내신 출제 경향 분석 및 ${subjectName} 1등급 도약 커리큘럼`,
'provider': {
'@type': 'Organization',
'name': siteName
}
},
{
'@type': 'LocalBusiness',
'name': `${regionTitle} 1:1 방문 과외`,
'image': `${siteDomain}/img/og-preview.png`,
'url': canonicalUrl,
'telephone': '+82-10-5961-5807',
'priceRange': '₩₩',
'address': {
'@type': 'PostalAddress',
'addressLocality': sido,
'addressRegion': sigungu,
'streetAddress': dong,
'addressCountry': 'KR'
},
'areaServed': `${sido} ${sigungu} ${dong}`
},
{
'@type': 'FAQPage',
'mainEntity': [
{
'@type': 'Question',
'name': `${dong} ${grade} ${subjectName} 방문 과외와 온라인 화상 과외 중 어떤 것이 가능한가요?`,
'acceptedAnswer': {
'@type': 'Answer',
'text': `학생과 학부모님의 선호에 따라 100% 자택 방문 대면 과외 또는 실시간 쌍방향 비대면 화상 과외 중 자유롭게 선택하실 수 있습니다. ${dong} 전 지역 방문 수업이 가능합니다.`
}
},
{
'@type': 'Question',
'name': `${grade} ${subjectName} 전문 선생님이 학생과 잘 맞지 않으면 교체 가능한가요?`,
'acceptedAnswer': {
'@type': 'Answer',
'text': '네, 1회 무료 모의수업을 통해 사전에 호흡을 맞추며, 정규 수업 시작 후에도 학생의 성향이나 요청에 따라 추가 비용 없이 100% 무료 교체 및 환불 규정을 보장합니다.'
}
},
{
'@type': 'Question',
'name': `${grade} ${subjectName} 과외 수업 비용은 어떻게 되나요?`,
'acceptedAnswer': {
'@type': 'Answer',
'text': `${grade} 내신 단계, 주당 수업 횟수, 수업 시간(1회 60분/90분/120분)에 따라 표준 교육청 가이드라인에 맞춘 투명한 정찰제로 운영됩니다. 무료 상담 시 상세 견적표를 안내해 드립니다.`
}
},
{
'@type': 'Question',
'name': `${dong} 학교 중간·기말고사 직전 단기 ${subjectName} 족보 클리닉도 가능한가요?`,
'acceptedAnswer': {
'@type': 'Answer',
'text': `네, 시험 3~4주 전 학교별 기출 족보 풀이 및 서술형 배점 방어를 위한 ${grade} ${subjectName} 단기 속성 킬러 클리닉 프로그램도 상시 운영 중입니다.`
}
},
{
'@type': 'Question',
'name': `${subjectName} 외에 다른 과목도 함께 상담받을 수 있나요?`,
'acceptedAnswer': {
'@type': 'Answer',
'text': `${subjectName} 집중 신청은 물론, 국영수 또는 수탐 복합 패키지로 맞춤 구성하여 전 과목 플래너 관리와 함께 시간표를 편성하실 수 있습니다.`
}
}
]
},
{
'@type': 'BreadcrumbList',
'itemListElement': [
{
'@type': 'ListItem',
'position': 1,
'name': '홈',
'item': siteDomain
},
{
'@type': 'ListItem',
'position': 2,
'name': sido,
'item': `${siteDomain}/${encodeURIComponent(sido)}`
},
{
'@type': 'ListItem',
'position': 3,
'name': sigungu,
'item': `${siteDomain}/${encodeURIComponent(sigungu)}`
},
{
'@type': 'ListItem',
'position': 4,
'name': `${dong} ${subjectName}`,
'item': canonicalUrl
}
]
}
]
}
return {
title: pageTitle,
meta: [
{ name: 'naver-site-verification', content: '299523ed34c7419d7fb724426e14b5def8badac7' },
{ name: 'description', content: pageDescription },
{ name: 'keywords', content: `${dong}과외, ${dong}${subjectName}과외, ${dong}${grade}과외, ${sigungu}과외, ${dong}학원, ${dong}내신대비, ${subjectName}1:1과외` },
{ property: 'og:type', content: 'website' },
{ property: 'og:title', content: pageTitle },
{ property: 'og:description', content: pageDescription },
{ property: 'og:url', content: canonicalUrl },
{ property: 'og:site_name', content: siteName },
{ property: 'og:image', content: `${siteDomain}/img/og-preview.png` },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:title', content: pageTitle },
{ name: 'twitter:description', content: pageDescription }
],
link: [
{ rel: 'canonical', href: canonicalUrl }
],
script: [
{
type: 'application/ld+json',
children: JSON.stringify(jsonLd)
}
]
}
}