diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 024c6ae..fa8deaa 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -1,30 +1,59 @@ import { defineConfig } from 'vitepress' export default defineConfig({ - title: 'Windows Folder Remark Tool', - description: 'A lightweight CLI tool to add remarks/comments to Windows folders via Desktop.ini', + title: 'Windows 文件夹备注工具', + description: '一个轻量级的命令行工具,通过 Desktop.ini 为 Windows 文件夹添加备注/评论。无系统驻留,无数据上传,安全放心,用完即走。', base: '/windows-folder-remark/', - lang: 'en-US', + lang: 'zh-CN', locales: { root: { - label: 'English', - lang: 'en-US' - }, - zh: { label: '简体中文', - lang: 'zh-CN', - link: '/zh/' + lang: 'zh-CN' + }, + en: { + label: 'English', + lang: 'en-US', + link: '/en/' + } + }, + + head: [ + ['link', { rel: 'alternate', hreflang: 'zh-CN', href: 'https://piratf.github.io/windows-folder-remark/' }], + ['link', { rel: 'alternate', hreflang: 'en-US', href: 'https://piratf.github.io/windows-folder-remark/en/' }], + ['link', { rel: 'alternate', hreflang: 'x-default', href: 'https://piratf.github.io/windows-folder-remark/en/' }] + ], + + sitemap: { + hostname: 'https://piratf.github.io', + transformItems(items) { + return items.map((item) => { + return { + url: '/windows-folder-remark' + (item.url.startsWith('/') ? '' : '/') + item.url, + changefreq: 'weekly', + } + }) } }, themeConfig: { nav: () => [ - { text: 'Guide', link: '/en/guide/' }, - { text: '中文', link: '/zh/' } + { text: '指南', link: '/guide/' }, + { text: 'English', link: '/en/' } ], sidebar: { + '/': [ + { + text: '指南', + items: [ + { text: '介绍', link: '/' }, + { text: '快速开始', link: '/guide/getting-started' }, + { text: '使用方法', link: '/guide/usage' }, + { text: 'API 参考', link: '/guide/api' } + ] + } + ], '/en/': [ { text: 'Guide', @@ -35,17 +64,6 @@ export default defineConfig({ { text: 'API Reference', link: '/en/guide/api' } ] } - ], - '/zh/': [ - { - text: '指南', - items: [ - { text: '介绍', link: '/zh/' }, - { text: '快速开始', link: '/zh/guide/getting-started' }, - { text: '使用方法', link: '/zh/guide/usage' }, - { text: 'API 参考', link: '/zh/guide/api' } - ] - } ] } } diff --git a/docs/en/index.md b/docs/en/index.md index 2e7f6e8..4b150e6 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -1,6 +1,27 @@ --- layout: home +head: + - - script + - type: application/ld+json + - | + { + "@context": "https://schema.org", + "@type": "SoftwareSourceCode", + "name": "Windows Folder Remark Tool", + "description": "A lightweight CLI tool to add remarks/comments to Windows folders via Desktop.ini. No system residency, no data upload, safe and secure, use it when you need it.", + "programmingLanguage": "Python", + "codeRepository": "https://github.com/piratf/windows-folder-remark", + "url": "https://piratf.github.io/windows-folder-remark/en/", + "version": "2.0.6", + "license": "MIT", + "offers": { + "@type": "Offer", + "price": "0", + "priceCurrency": "USD" + } + } + hero: name: Windows Folder Remark Tool text: A Lightweight CLI Tool for Windows Folder Remarks @@ -8,7 +29,7 @@ hero: actions: - theme: brand text: Get Started - link: /en/guide/getting-started + link: /guide/getting-started - theme: alt text: GitHub link: https://github.com/piratf/windows-folder-remark diff --git a/docs/zh/guide/api.md b/docs/guide/api.md similarity index 100% rename from docs/zh/guide/api.md rename to docs/guide/api.md diff --git a/docs/zh/guide/getting-started.md b/docs/guide/getting-started.md similarity index 100% rename from docs/zh/guide/getting-started.md rename to docs/guide/getting-started.md diff --git a/docs/zh/guide/usage.md b/docs/guide/usage.md similarity index 100% rename from docs/zh/guide/usage.md rename to docs/guide/usage.md diff --git a/docs/zh/index.md b/docs/index.md similarity index 53% rename from docs/zh/index.md rename to docs/index.md index c4d7b59..cc223c7 100644 --- a/docs/zh/index.md +++ b/docs/index.md @@ -1,14 +1,35 @@ --- layout: home +head: + - - script + - type: application/ld+json + - | + { + "@context": "https://schema.org", + "@type": "SoftwareSourceCode", + "name": "Windows 文件夹备注工具", + "description": "一个轻量级的命令行工具,通过 Desktop.ini 为 Windows 文件夹添加备注/评论。无系统驻留,无数据上传,安全放心,用完即走。", + "programmingLanguage": "Python", + "codeRepository": "https://github.com/piratf/windows-folder-remark", + "url": "https://piratf.github.io/windows-folder-remark/", + "version": "2.0.6", + "license": "MIT", + "offers": { + "@type": "Offer", + "price": "0", + "priceCurrency": "USD" + } + } + hero: - name: Windows Folder Remark Tool + name: Windows 文件夹备注工具 text: 轻量级 Windows 文件夹备注工具 tagline: 通过 Desktop.ini 为 Windows 文件夹添加备注/评论 actions: - theme: brand text: 快速开始 - link: /zh/guide/getting-started + link: /guide/getting-started - theme: alt text: GitHub link: https://github.com/piratf/windows-folder-remark diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 0000000..8bd9712 --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://piratf.github.io/windows-folder-remark/sitemap.xml