diff --git a/.vitepress/config.ts b/.vitepress/config.ts deleted file mode 100644 index 126ad2d..0000000 --- a/.vitepress/config.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { defineConfig } from 'vitepress' - -export default defineConfig({ - // 网站基本信息 - title: 'License Manager', - lang: 'zh-CN', - - // SEO 和 Meta 标签 - head: [ - // 基础 favicon - ['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/images/logo.png' }], - ['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/images/logo.png' }], - ['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/images/logo.png' }], - ['link', { rel: 'manifest', href: '/site.webmanifest' }], - - // SEO 基础标签 - ['meta', { name: 'description', content: 'License Manager - 专业的企业级软件授权管理系统,支持在线/离线授权模式,基于硬件绑定确保安全性。一站式解决授权码生成、发放、验证与全生命周期管理。' }], - ['meta', { name: 'keywords', content: '软件授权管理,License Manager,授权码生成,硬件绑定,软件许可,许可证管理,软件保护' }], - ['meta', { name: 'author', content: 'License Manager Team' }], - ['meta', { name: 'robots', content: 'index, follow' }], - ['meta', { name: 'googlebot', content: 'index, follow' }], - ['meta', { name: 'language', content: 'zh-CN' }], - - // Open Graph (Facebook, LinkedIn, etc.) - ['meta', { property: 'og:type', content: 'website' }], - ['meta', { property: 'og:title', content: 'License Manager - 专业软件授权管理系统' }], - ['meta', { property: 'og:description', content: '企业级软件授权管理系统,支持在线/离线授权,硬件绑定保护,完整生命周期管理' }], - ['meta', { property: 'og:image', content: '/images/logo.png' }], - ['meta', { property: 'og:url', content: 'https://lm.cedar-v.com' }], - ['meta', { property: 'og:site_name', content: 'License Manager' }], - ['meta', { property: 'og:locale', content: 'zh_CN' }], - - // Twitter Card - ['meta', { name: 'twitter:card', content: 'summary_large_image' }], - ['meta', { name: 'twitter:title', content: 'License Manager - 专业软件授权管理系统' }], - ['meta', { name: 'twitter:description', content: '企业级软件授权管理系统,支持在线/离线授权,硬件绑定保护,完整生命周期管理' }], - ['meta', { name: 'twitter:image', content: '/images/logo.png' }], - ['meta', { name: 'twitter:site', content: '@LicenseManager' }], - - // 移动设备优化 - ['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' }], - ['meta', { name: 'mobile-web-app-capable', content: 'yes' }], - ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], - ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'default' }], - ['meta', { name: 'apple-mobile-web-app-title', content: 'License Manager' }], - - // 百度SEO优化 - 请替换为你的实际百度验证代码 - ['meta', { name: 'baidu-site-verification', content: 'codeva-3kpa9ujDyB' }], - ['meta', { name: 'renderer', content: 'webkit' }], - ['meta', { name: 'applicable-device', content: 'pc,mobile' }], - - // 安全和性能 - ['meta', { 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' }], - ['meta', { name: 'format-detection', content: 'telephone=no' }], - - // 百度统计代码 - ['script', {}, ` - var _hmt = _hmt || []; - (function() { - var hm = document.createElement("script"); - hm.src = "https://hm.baidu.com/hm.js?0bb0e3047706f56c57a9faf920fcde2a"; // 百度统计ID - var s = document.getElementsByTagName("script")[0]; - s.parentNode.insertBefore(hm, s); - })(); - `], - - // 结构化数据 (JSON-LD) - ['script', { type: 'application/ld+json' }, JSON.stringify({ - '@context': 'https://schema.org', - '@type': 'SoftwareApplication', - 'name': 'License Manager', - 'description': '专业的企业级软件授权管理系统,支持在线/离线授权模式,基于硬件绑定确保安全性', - 'url': 'https://lm.cedar-v.com', - 'applicationCategory': 'DeveloperApplication', - 'operatingSystem': 'Cross-platform', - 'offers': { - '@type': 'Offer', - 'price': '0', - 'priceCurrency': 'CNY' - }, - 'author': { - '@type': 'Organization', - 'name': 'License Manager Team' - }, - 'publisher': { - '@type': 'Organization', - 'name': 'License Manager Team' - } - })] - ], - - // 多语言配置 - locales: { - root: { - label: '中文', - lang: 'zh-CN' - }, - en: { - label: 'English', - lang: 'en-US', - link: '/en/' - } - }, - - // 主题配置 - themeConfig: { - // SEO 友好的站点信息 - siteTitle: 'License Manager', - - // 搜索优化 - search: { - provider: 'local', - options: { - locales: { - 'zh-CN': { - translations: { - button: { - buttonText: '搜索文档', - buttonAriaLabel: '搜索文档' - }, - modal: { - displayDetails: '显示详细列表', - resetButtonTitle: '清除查询条件', - backButtonTitle: '返回上一级', - noResultsText: '无法找到相关结果', - footer: { - selectText: '选择', - selectKeyAriaLabel: 'enter', - navigateText: '切换', - navigateUpKeyAriaLabel: '上箭头', - navigateDownKeyAriaLabel: '下箭头', - closeText: '关闭', - closeKeyAriaLabel: 'escape' - } - } - } - } - } - } - } - }, - - // Vite 配置 - vite: { - build: { - rollupOptions: { - output: { - manualChunks: { - 'mermaid': ['mermaid'] - } - } - } - } - } -}) diff --git a/BAIDU_SEO_README.md b/BAIDU_SEO_README.md index 134918c..93cde37 100644 --- a/BAIDU_SEO_README.md +++ b/BAIDU_SEO_README.md @@ -7,7 +7,7 @@ 2. 注册账号并登录 3. 点击"添加网站" 4. 填写网站信息: - - 网站域名:`lm.cedar-v.com` + - 网站域名:`docs.lm.cedar-v.com` - 网站名称:`License Manager` 5. 复制统计代码中的ID(格式类似:`12345678`) @@ -23,7 +23,7 @@ hm.src = "https://hm.baidu.com/hm.js?你的统计ID"; ### 获取验证代码 1. 访问 [百度搜索资源平台](https://ziyuan.baidu.com/) 2. 登录账号 -3. 添加站点 `lm.cedar-v.com` +3. 添加站点 `docs.lm.cedar-v.com` 4. 获取验证代码 ### 配置验证代码 @@ -33,14 +33,16 @@ hm.src = "https://hm.baidu.com/hm.js?你的统计ID"; ['meta', { name: 'baidu-site-verification', content: '你的验证代码' }], ``` -### HTML文件验证(备用) -如果需要HTML文件验证,将 `docs/baidu_verify.html` 文件中的 `YOUR_BAIDU_VERIFY_ID` 替换为验证ID。 +### HTML文件验证(可选) +百度支持“验证文件”方式:平台会给你一个**指定文件名**(通常形如 `baidu_verify_xxx.html`)和文件内容要求。 + +如果你选择这种方式:在 `docs/public/` 下新建对应文件(文件名和内容都按百度提供的来),构建后它会出现在站点根路径(`/baidu_verify_xxx.html`)。 ## 3. 网站提交 ### 提交Sitemap -1. 在百度搜索资源平台提交 sitemap:`https://lm.cedar-v.com/sitemap.xml` -2. 提交robots.txt:`https://lm.cedar-v.com/robots.txt` +1. 在百度搜索资源平台提交 sitemap:`https://docs.lm.cedar-v.com/sitemap.xml` +2. 提交robots.txt:`https://docs.lm.cedar-v.com/robots.txt` ### 主动推送 可以使用百度链接提交工具推送重要页面。 diff --git a/CNAME b/CNAME index d0d3e48..15da065 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -"docs.lm.cedar-v.com" +docs.lm.cedar-v.com diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 17ee280..62ab3b1 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -7,20 +7,101 @@ export default withMermaid( lang: 'zh-CN', description: 'License Manager Documentation', head: [ - ['link', { rel: 'icon', type: 'image/png', href: '/images/logo.png' }], - ['link', { rel: 'apple-touch-icon', href: '/images/logo.png' }], + // 基础 favicon / PWA + ['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/images/logo.png' }], + ['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/images/logo.png' }], + ['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/images/logo.png' }], + ['link', { rel: 'manifest', href: '/site.webmanifest' }], + + // SEO 基础标签 + [ + 'meta', + { + name: 'description', + content: + 'License Manager - 专业的企业级软件授权管理系统,支持在线/离线授权模式,基于硬件绑定确保安全性。一站式解决授权码生成、发放、验证与全生命周期管理。' + } + ], + [ + 'meta', + { + name: 'keywords', + content: '软件授权管理,License Manager,授权码生成,硬件绑定,软件许可,许可证管理,软件保护' + } + ], + ['meta', { name: 'author', content: 'License Manager Team' }], + ['meta', { name: 'robots', content: 'index, follow' }], + ['meta', { name: 'googlebot', content: 'index, follow' }], + ['meta', { name: 'language', content: 'zh-CN' }], + + // Open Graph (Facebook, LinkedIn, etc.) + ['meta', { property: 'og:type', content: 'website' }], + ['meta', { property: 'og:title', content: 'License Manager - 专业软件授权管理系统' }], + [ + 'meta', + { + property: 'og:description', + content: '企业级软件授权管理系统,支持在线/离线授权,硬件绑定保护,完整生命周期管理' + } + ], + ['meta', { property: 'og:image', content: '/images/logo.png' }], + ['meta', { property: 'og:url', content: 'https://docs.lm.cedar-v.com' }], + ['meta', { property: 'og:site_name', content: 'License Manager' }], + ['meta', { property: 'og:locale', content: 'zh_CN' }], + + // Twitter Card + ['meta', { name: 'twitter:card', content: 'summary_large_image' }], + ['meta', { name: 'twitter:title', content: 'License Manager - 专业软件授权管理系统' }], + [ + 'meta', + { + name: 'twitter:description', + content: '企业级软件授权管理系统,支持在线/离线授权,硬件绑定保护,完整生命周期管理' + } + ], + ['meta', { name: 'twitter:image', content: '/images/logo.png' }], + ['meta', { name: 'twitter:site', content: '@LicenseManager' }], + + // 移动设备优化(避免重复注入 viewport,这里只保留 PWA 相关) + ['meta', { name: 'mobile-web-app-capable', content: 'yes' }], + ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], + ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'default' }], + ['meta', { name: 'apple-mobile-web-app-title', content: 'License Manager' }], + + // 百度 SEO ['meta', { name: 'baidu-site-verification', content: 'codeva-3kpa9ujDyB' }], + ['meta', { name: 'renderer', content: 'webkit' }], + ['meta', { name: 'applicable-device', content: 'pc,mobile' }], + + // 安全和性能 + ['meta', { 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' }], + ['meta', { name: 'format-detection', content: 'telephone=no' }], + + // 百度统计 [ 'script', {}, - `var _hmt = _hmt || []; -(function() { - var hm = document.createElement("script"); - hm.src = "https://hm.baidu.com/hm.js?0bb0e3047706f56c57a9faf920fcde2a"; - var s = document.getElementsByTagName("script")[0]; - s.parentNode.insertBefore(hm, s); -})();` + `var _hmt=_hmt||[];(function(){var hm=document.createElement("script");hm.src="https://hm.baidu.com/hm.js?0bb0e3047706f56c57a9faf920fcde2a";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm,s)})();` ], + + // 结构化数据 (JSON-LD) + [ + 'script', + { type: 'application/ld+json' }, + JSON.stringify({ + '@context': 'https://schema.org', + '@type': 'SoftwareApplication', + name: 'License Manager', + description: '专业的企业级软件授权管理系统,支持在线/离线授权模式,基于硬件绑定确保安全性', + url: 'https://docs.lm.cedar-v.com', + applicationCategory: 'DeveloperApplication', + operatingSystem: 'Cross-platform', + offers: { '@type': 'Offer', price: '0', priceCurrency: 'CNY' }, + author: { '@type': 'Organization', name: 'License Manager Team' }, + publisher: { '@type': 'Organization', name: 'License Manager Team' } + }) + ], + ['script', { src: 'https://code.iconify.design/iconify-icon/1.0.8/iconify-icon.min.js', defer: '' }] ], base: '/', // 使用自定义域名时,base 应该设置为 '/' @@ -64,6 +145,7 @@ export default withMermaid( en: { label: 'English', lang: 'en-US', + link: '/en/', themeConfig: { nav: [ { text: 'Home', link: '/en/' }, @@ -91,25 +173,33 @@ export default withMermaid( }, themeConfig: { - nav: [ - { text: 'Home', link: '/' }, - { text: 'Guide', link: '/guide/' } - ], - - sidebar: { - '/guide/': [ - { - text: 'Guide', - items: [ - { text: 'Introduction', link: '/guide/' }, - { text: 'Getting Started', link: '/guide/getting-started' }, - { text: 'Operating Guide', link: '/guide/operating_guide' }, - { text: 'Client SDK | 客户端 SDK', link: '/guide/sdk' }, - { text: 'License Token Structure', link: '/guide/license-token-structure' }, - { text: 'API 文档 | API Reference', link: '/guide/api' } - ] + siteTitle: 'License Manager', + search: { + provider: 'local', + options: { + locales: { + 'zh-CN': { + translations: { + button: { buttonText: '搜索文档', buttonAriaLabel: '搜索文档' }, + modal: { + displayDetails: '显示详细列表', + resetButtonTitle: '清除查询条件', + backButtonTitle: '返回上一级', + noResultsText: '无法找到相关结果', + footer: { + selectText: '选择', + selectKeyAriaLabel: 'enter', + navigateText: '切换', + navigateUpKeyAriaLabel: '上箭头', + navigateDownKeyAriaLabel: '下箭头', + closeText: '关闭', + closeKeyAriaLabel: 'escape' + } + } + } + } } - ] + } } }, diff --git a/docs/baidu_verify.html b/docs/baidu_verify.html deleted file mode 100644 index 3dbbc27..0000000 --- a/docs/baidu_verify.html +++ /dev/null @@ -1,15 +0,0 @@ - - -
- - -百度搜索资源平台验证文件
-验证ID: YOUR_BAIDU_VERIFY_ID
-验证时间: 2025-01-17
- - diff --git a/docs/robots.txt b/docs/public/robots.txt similarity index 84% rename from docs/robots.txt rename to docs/public/robots.txt index cd08b47..059d857 100644 --- a/docs/robots.txt +++ b/docs/public/robots.txt @@ -31,7 +31,7 @@ Disallow: /.github/ Disallow: /dist/ # XML Sitemap -Sitemap: https://lm.cedar-v.com/sitemap.xml +Sitemap: https://docs.lm.cedar-v.com/sitemap.xml # HTML Sitemap -Sitemap: https://lm.cedar-v.com/sitemap.html +Sitemap: https://docs.lm.cedar-v.com/sitemap.html diff --git a/docs/site.webmanifest b/docs/public/site.webmanifest similarity index 100% rename from docs/site.webmanifest rename to docs/public/site.webmanifest diff --git a/docs/sitemap.xml b/docs/public/sitemap.xml similarity index 59% rename from docs/sitemap.xml rename to docs/public/sitemap.xml index bbc4669..8769554 100644 --- a/docs/sitemap.xml +++ b/docs/public/sitemap.xml @@ -6,7 +6,7 @@