feat: 增加编辑此页
This commit is contained in:
+90
-28
@@ -202,9 +202,7 @@ const getSeoHead = (locale, title, description, path = '') => {
|
|||||||
'@type': 'ImageObject',
|
'@type': 'ImageObject',
|
||||||
url: ogImageUrl
|
url: ogImageUrl
|
||||||
},
|
},
|
||||||
sameAs: [
|
sameAs: ['https://github.com/datawhalechina/easy-vibe']
|
||||||
'https://github.com/datawhalechina/easy-vibe'
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
mainEntity: {
|
mainEntity: {
|
||||||
'@type': 'Course',
|
'@type': 'Course',
|
||||||
@@ -244,25 +242,25 @@ const getSeoHead = (locale, title, description, path = '') => {
|
|||||||
'stage-1': 'AI产品经理',
|
'stage-1': 'AI产品经理',
|
||||||
'stage-2': '初中级开发工程师',
|
'stage-2': '初中级开发工程师',
|
||||||
'stage-3': '高级开发工程师',
|
'stage-3': '高级开发工程师',
|
||||||
'appendix': '附录',
|
appendix: '附录',
|
||||||
'guide': '指南',
|
guide: '指南',
|
||||||
'frontend': '前端',
|
frontend: '前端',
|
||||||
'backend': '后端',
|
backend: '后端',
|
||||||
'ai-capabilities': 'AI能力',
|
'ai-capabilities': 'AI能力',
|
||||||
'core-skills': '核心技能',
|
'core-skills': '核心技能',
|
||||||
'cross-platform': '跨平台开发',
|
'cross-platform': '跨平台开发',
|
||||||
'personal-brand': '个人品牌',
|
'personal-brand': '个人品牌',
|
||||||
'ai-advanced': 'AI进阶'
|
'ai-advanced': 'AI进阶'
|
||||||
},
|
},
|
||||||
'en': {
|
en: {
|
||||||
'stage-0': 'Kindergarten',
|
'stage-0': 'Kindergarten',
|
||||||
'stage-1': 'AI Product Manager',
|
'stage-1': 'AI Product Manager',
|
||||||
'stage-2': 'Junior Developer',
|
'stage-2': 'Junior Developer',
|
||||||
'stage-3': 'Senior Developer',
|
'stage-3': 'Senior Developer',
|
||||||
'appendix': 'Appendix',
|
appendix: 'Appendix',
|
||||||
'guide': 'Guide',
|
guide: 'Guide',
|
||||||
'frontend': 'Frontend',
|
frontend: 'Frontend',
|
||||||
'backend': 'Backend',
|
backend: 'Backend',
|
||||||
'ai-capabilities': 'AI Capabilities',
|
'ai-capabilities': 'AI Capabilities',
|
||||||
'core-skills': 'Core Skills',
|
'core-skills': 'Core Skills',
|
||||||
'cross-platform': 'Cross-platform',
|
'cross-platform': 'Cross-platform',
|
||||||
@@ -293,7 +291,11 @@ const getSeoHead = (locale, title, description, path = '') => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const breadcrumbJsonLd = generateBreadcrumbList()
|
const breadcrumbJsonLd = generateBreadcrumbList()
|
||||||
head.push(['script', { type: 'application/ld+json', class: 'breadcrumb-jsonld' }, JSON.stringify(breadcrumbJsonLd)])
|
head.push([
|
||||||
|
'script',
|
||||||
|
{ type: 'application/ld+json', class: 'breadcrumb-jsonld' },
|
||||||
|
JSON.stringify(breadcrumbJsonLd)
|
||||||
|
])
|
||||||
|
|
||||||
return head
|
return head
|
||||||
}
|
}
|
||||||
@@ -311,6 +313,10 @@ const commonThemeConfig = {
|
|||||||
// socialLinks: [
|
// socialLinks: [
|
||||||
// { icon: 'github', link: 'https://github.com/datawhalechina/easy-vibe' }
|
// { icon: 'github', link: 'https://github.com/datawhalechina/easy-vibe' }
|
||||||
// ],
|
// ],
|
||||||
|
editLink: {
|
||||||
|
pattern: 'https://github.com/datawhalechina/easy-vibe/edit/main/docs/:path',
|
||||||
|
text: 'Edit this page on GitHub'
|
||||||
|
},
|
||||||
outline: {
|
outline: {
|
||||||
level: [1, 6]
|
level: [1, 6]
|
||||||
},
|
},
|
||||||
@@ -1223,11 +1229,15 @@ Disallow: /@fs/
|
|||||||
Sitemap: ${siteUrl}/sitemap.xml
|
Sitemap: ${siteUrl}/sitemap.xml
|
||||||
`
|
`
|
||||||
|
|
||||||
const outDir = siteConfig.outDir || path.resolve(__dirname, '.vitepress/dist')
|
const outDir =
|
||||||
|
siteConfig.outDir || path.resolve(__dirname, '.vitepress/dist')
|
||||||
const robotsPath = path.join(outDir, 'robots.txt')
|
const robotsPath = path.join(outDir, 'robots.txt')
|
||||||
|
|
||||||
fs.writeFileSync(robotsPath, robotsTxt, 'utf-8')
|
fs.writeFileSync(robotsPath, robotsTxt, 'utf-8')
|
||||||
console.log('✓ Generated robots.txt with sitemap URL:', `${siteUrl}/sitemap.xml`)
|
console.log(
|
||||||
|
'✓ Generated robots.txt with sitemap URL:',
|
||||||
|
`${siteUrl}/sitemap.xml`
|
||||||
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 多语言配置 - 使用 cn/en-us/ja 结构
|
// 多语言配置 - 使用 cn/en-us/ja 结构
|
||||||
@@ -1289,7 +1299,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: '附录知识库', link: '/zh-cn/appendix/index', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: '附录知识库',
|
||||||
|
link: '/zh-cn/appendix/index',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {
|
sidebar: {
|
||||||
'/zh-cn/stage-0/': productManagerSidebar,
|
'/zh-cn/stage-0/': productManagerSidebar,
|
||||||
@@ -2082,7 +2096,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/en/stage-3/'
|
activeMatch: '/en/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: 'Appendix', link: '/zh-cn/appendix/index', activeMatch: '/en/appendix/' }
|
{
|
||||||
|
text: 'Appendix',
|
||||||
|
link: '/zh-cn/appendix/index',
|
||||||
|
activeMatch: '/en/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {
|
sidebar: {
|
||||||
'/en/stage-0/': productManagerSidebarEn,
|
'/en/stage-0/': productManagerSidebarEn,
|
||||||
@@ -2136,7 +2154,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: '付録', link: '/zh-cn/appendix/', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: '付録',
|
||||||
|
link: '/zh-cn/appendix/',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
// TODO: Add Japanese sidebar when content is ready
|
// TODO: Add Japanese sidebar when content is ready
|
||||||
sidebar: {}
|
sidebar: {}
|
||||||
@@ -2183,7 +2205,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: '附錄', link: '/zh-cn/appendix/', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: '附錄',
|
||||||
|
link: '/zh-cn/appendix/',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {}
|
sidebar: {}
|
||||||
}
|
}
|
||||||
@@ -2214,7 +2240,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
},
|
},
|
||||||
nav: [
|
nav: [
|
||||||
{ text: '홈', link: '/ko-kr/' },
|
{ text: '홈', link: '/ko-kr/' },
|
||||||
{ text: '초보자 & PM', link: '/zh-cn/stage-0/', activeMatch: '/zh-cn/stage-0/' },
|
{
|
||||||
|
text: '초보자 & PM',
|
||||||
|
link: '/zh-cn/stage-0/',
|
||||||
|
activeMatch: '/zh-cn/stage-0/'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: '풀스택 개발',
|
text: '풀스택 개발',
|
||||||
link: '/zh-cn/stage-2/',
|
link: '/zh-cn/stage-2/',
|
||||||
@@ -2225,7 +2255,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: '부록', link: '/zh-cn/appendix/', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: '부록',
|
||||||
|
link: '/zh-cn/appendix/',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {}
|
sidebar: {}
|
||||||
}
|
}
|
||||||
@@ -2271,7 +2305,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: 'Apéndice', link: '/zh-cn/appendix/', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: 'Apéndice',
|
||||||
|
link: '/zh-cn/appendix/',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {}
|
sidebar: {}
|
||||||
}
|
}
|
||||||
@@ -2302,7 +2340,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
},
|
},
|
||||||
nav: [
|
nav: [
|
||||||
{ text: 'Accueil', link: '/fr-fr/' },
|
{ text: 'Accueil', link: '/fr-fr/' },
|
||||||
{ text: 'Débutant & PM', link: '/zh-cn/stage-0/', activeMatch: '/zh-cn/stage-0/' },
|
{
|
||||||
|
text: 'Débutant & PM',
|
||||||
|
link: '/zh-cn/stage-0/',
|
||||||
|
activeMatch: '/zh-cn/stage-0/'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: 'Développement Full Stack',
|
text: 'Développement Full Stack',
|
||||||
link: '/zh-cn/stage-2/',
|
link: '/zh-cn/stage-2/',
|
||||||
@@ -2313,7 +2355,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: 'Annexe', link: '/zh-cn/appendix/', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: 'Annexe',
|
||||||
|
link: '/zh-cn/appendix/',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {}
|
sidebar: {}
|
||||||
}
|
}
|
||||||
@@ -2344,7 +2390,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
},
|
},
|
||||||
nav: [
|
nav: [
|
||||||
{ text: 'Start', link: '/de-de/' },
|
{ text: 'Start', link: '/de-de/' },
|
||||||
{ text: 'Anfänger & PM', link: '/zh-cn/stage-0/', activeMatch: '/zh-cn/stage-0/' },
|
{
|
||||||
|
text: 'Anfänger & PM',
|
||||||
|
link: '/zh-cn/stage-0/',
|
||||||
|
activeMatch: '/zh-cn/stage-0/'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: 'Full Stack Entwicklung',
|
text: 'Full Stack Entwicklung',
|
||||||
link: '/zh-cn/stage-2/',
|
link: '/zh-cn/stage-2/',
|
||||||
@@ -2355,7 +2405,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: 'Anhang', link: '/zh-cn/appendix/', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: 'Anhang',
|
||||||
|
link: '/zh-cn/appendix/',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {}
|
sidebar: {}
|
||||||
}
|
}
|
||||||
@@ -2401,7 +2455,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: 'ملحق', link: '/zh-cn/appendix/', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: 'ملحق',
|
||||||
|
link: '/zh-cn/appendix/',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {}
|
sidebar: {}
|
||||||
}
|
}
|
||||||
@@ -2448,7 +2506,11 @@ Sitemap: ${siteUrl}/sitemap.xml
|
|||||||
link: '/zh-cn/stage-3/',
|
link: '/zh-cn/stage-3/',
|
||||||
activeMatch: '/zh-cn/stage-3/'
|
activeMatch: '/zh-cn/stage-3/'
|
||||||
},
|
},
|
||||||
{ text: 'Phụ lục', link: '/zh-cn/appendix/', activeMatch: '/zh-cn/appendix/' }
|
{
|
||||||
|
text: 'Phụ lục',
|
||||||
|
link: '/zh-cn/appendix/',
|
||||||
|
activeMatch: '/zh-cn/appendix/'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
sidebar: {}
|
sidebar: {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user