Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 38 additions & 29 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ const base = process.env.VITEPRESS_BASE || '/'

const basePrefix = base !== '/' ? base.replace(/\/$/, '') : ''

const docsOrigin = 'https://docs.icoco.ai'
const openMaxIdentity = Object.freeze({
name: 'OpenMax',
website: 'https://openmax.com/',
logo: `${docsOrigin}/coco-logo-black.png`,
xUrl: 'https://x.com/OpenMaxAI',
xHandle: '@OpenMaxAI',
})

export default defineConfig({
base,
cleanUrls: true,

sitemap: {
hostname: 'https://docs.icoco.ai',
hostname: docsOrigin,
transformItems(items) {
const now = new Date().toISOString().split('T')[0]

Expand Down Expand Up @@ -120,20 +129,20 @@ export default defineConfig({
const cleanPath = pageData.relativePath.replace(/\.md$/, '').replace(/index$/, '')

// P1-3: Canonical URL for every page
const canonicalUrl = `https://docs.icoco.ai/${cleanPath}`
const canonicalUrl = `${docsOrigin}/${cleanPath}`
head.push(['link', { rel: 'canonical', href: canonicalUrl }])

// P1-4: hreflang alternate links for bilingual pages
const enPath = isZh ? cleanPath.replace(/^zh\//, '') : cleanPath
const zhPath = isZh ? cleanPath : `zh/${cleanPath}`
head.push(['link', { rel: 'alternate', hreflang: 'en', href: `https://docs.icoco.ai/${enPath}` }])
head.push(['link', { rel: 'alternate', hreflang: 'zh', href: `https://docs.icoco.ai/${zhPath}` }])
head.push(['link', { rel: 'alternate', hreflang: 'x-default', href: `https://docs.icoco.ai/${enPath}` }])
head.push(['link', { rel: 'alternate', hreflang: 'en', href: `${docsOrigin}/${enPath}` }])
head.push(['link', { rel: 'alternate', hreflang: 'zh', href: `${docsOrigin}/${zhPath}` }])
head.push(['link', { rel: 'alternate', hreflang: 'x-default', href: `${docsOrigin}/${enPath}` }])

// P0-1: Override OG tags for Chinese pages (global head sets English defaults)
// P1-5: og:locale (already included)
if (isZh) {
const zhTitle = pageData.title || 'COCO — AI 数字员工平台'
const zhTitle = pageData.title || 'OpenMax — AI 数字员工平台'
const zhDesc = pageData.description || 'AI 数字员工平台 — 用例、案例与文档'
head.push(['meta', { property: 'og:title', content: zhTitle }])
head.push(['meta', { property: 'og:description', content: zhDesc }])
Expand All @@ -153,19 +162,19 @@ export default defineConfig({
const orgJsonLd = {
'@context': 'https://schema.org',
'@type': 'Organization',
name: 'COCO',
url: 'https://icoco.ai',
logo: 'https://docs.icoco.ai/coco-logo-black.png',
name: openMaxIdentity.name,
url: openMaxIdentity.website,
logo: openMaxIdentity.logo,
sameAs: [
'https://x.com/CocoAIxyz',
openMaxIdentity.xUrl,
'https://github.com/coco-xyz',
],
}
const siteJsonLd = {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: isZh ? 'COCO — AI 数字员工平台' : 'COCO — AI Digital Employee Platform',
url: 'https://docs.icoco.ai',
name: isZh ? 'OpenMax — AI 数字员工平台' : 'OpenMax — AI Digital Employee Platform',
url: docsOrigin,
inLanguage: isZh ? 'zh-CN' : 'en-US',
}
head.push(['script', { type: 'application/ld+json' }, JSON.stringify(orgJsonLd)])
Expand All @@ -183,18 +192,18 @@ export default defineConfig({
description: pageData.description || '',
publisher: {
'@type': 'Organization',
name: 'COCO',
url: 'https://icoco.ai',
name: openMaxIdentity.name,
url: openMaxIdentity.website,
logo: {
'@type': 'ImageObject',
url: 'https://docs.icoco.ai/coco-logo-black.png',
url: openMaxIdentity.logo,
},
},
mainEntityOfPage: {
'@type': 'WebPage',
'@id': canonicalUrl,
},
image: 'https://docs.icoco.ai/coco-logo-black.png',
image: openMaxIdentity.logo,
datePublished: '2025-06-01',
dateModified: pageData.lastUpdated ? new Date(pageData.lastUpdated).toISOString().split('T')[0] : '2025-06-01',
}
Expand All @@ -221,14 +230,14 @@ export default defineConfig({
['link', { rel: 'icon', type: 'image/png', href: '/coco-icon.png' }],
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
['meta', { name: 'theme-color', content: '#FFD646' }],
['meta', { property: 'og:site_name', content: 'COCO' }],
['meta', { name: 'theme-color', content: '#3297D7' }],
['meta', { property: 'og:site_name', content: openMaxIdentity.name }],
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'og:title', content: 'COCO — AI Digital Employee Platform' }],
['meta', { property: 'og:title', content: 'OpenMax — AI Digital Employee Platform' }],
['meta', { property: 'og:description', content: 'AI teams that live in your chat tools — write docs, run research, automate operations, chase leads.' }],
['meta', { property: 'og:image', content: 'https://docs.icoco.ai/coco-logo-black.png' }],
['meta', { property: 'og:image', content: openMaxIdentity.logo }],
['meta', { name: 'twitter:card', content: 'summary' }],
['meta', { name: 'twitter:site', content: '@CocoAIxyz' }],
['meta', { name: 'twitter:site', content: openMaxIdentity.xHandle }],
['script', { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-GTMD3JHWQN' }],
['script', {}, "window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-GTMD3JHWQN');"],
],
Expand All @@ -237,7 +246,7 @@ export default defineConfig({
root: {
label: 'English',
lang: 'en-US',
title: 'COCO — AI Digital Employee Platform | Use Cases, Resources & Docs',
title: 'OpenMax — AI Digital Employee Platform | Use Cases, Resources & Docs',
description: 'AI teams that live in your chat tools — write docs, run research, automate operations, chase leads. No deployment, no code, just results.',
themeConfig: {
outline: { level: [2, 3] },
Expand All @@ -247,7 +256,7 @@ export default defineConfig({
{ text: 'Case Studies', link: '/case-studies/' },
{ text: 'Channels', link: '/channels/' },
{ text: 'Announcements', link: '/announcements/' },
{ text: 'Pricing', link: 'https://icoco.ai/#pricing' },
{ text: 'Pricing', link: openMaxIdentity.website },
],
sidebar: {
'/channels/': [
Expand Down Expand Up @@ -423,7 +432,7 @@ export default defineConfig({
zh: {
label: '中文',
lang: 'zh-CN',
title: 'COCO — AI 数字员工平台 | 用例、案例与文档',
title: 'OpenMax — AI 数字员工平台 | 用例、案例与文档',
description: 'AI 员工驻扎在你的聊天工具中 — 写文档、做调研、跑运营、追客户。无需部署,无需代码,只要结果。',
themeConfig: {
nav: [
Expand All @@ -432,7 +441,7 @@ export default defineConfig({
{ text: '案例', link: '/zh/case-studies/' },
{ text: '通讯渠道', link: '/zh/channels/' },
{ text: '公告', link: '/zh/announcements/' },
{ text: '定价', link: 'https://icoco.ai/#pricing' },
{ text: '定价', link: openMaxIdentity.website },
],
sidebar: {
'/zh/channels/': [
Expand Down Expand Up @@ -619,17 +628,17 @@ export default defineConfig({
},

themeConfig: {
logo: { light: '/coco-logo-black.png', dark: '/coco-logo-yellow.png' },
logo: { light: '/coco-logo-black.png', dark: '/coco-logo-white.png' },
siteTitle: false,

socialLinks: [
{ icon: 'github', link: 'https://github.com/coco-xyz' },
{ icon: 'x', link: 'https://x.com/CocoAIxyz' },
{ icon: 'x', link: openMaxIdentity.xUrl },
],

footer: {
message: '<a href="https://github.com/coco-xyz" target="_blank">COCO GitHub</a> · <a href="https://github.com/zylos-ai" target="_blank">Zylos GitHub</a> · AI Digital Employee Platform',
copyright: '© 2026 COCO. All rights reserved.',
message: '<a href="https://github.com/coco-xyz" target="_blank">GitHub</a> · <a href="https://github.com/zylos-ai" target="_blank">Zylos GitHub</a> · AI Digital Employee Platform',
copyright: '© 2026 OpenMax. All rights reserved.',
},

search: {
Expand Down
20 changes: 10 additions & 10 deletions docs/.vitepress/theme/CocoFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const columns = computed(() => {
{
title: '产品',
links: [
{ text: 'Agent Cloud', href: 'https://icoco.ai/#pricing' },
{ text: 'Agent Cloud', href: 'https://openmax.com/' },
{ text: 'Zylos', href: 'https://github.com/zylos-ai' },
{ text: 'HxA Suite', href: 'https://github.com/coco-xyz' },
],
Expand All @@ -29,14 +29,14 @@ const columns = computed(() => {
title: '资源',
links: [
{ text: '文档', href: withBase('/zh/') },
{ text: 'COCO', href: 'https://icoco.ai' },
{ text: 'OpenMax', href: 'https://openmax.com/' },
{ text: 'ZYLOS-Ai', href: 'https://github.com/zylos-ai' },
],
},
{
title: '公司',
links: [
{ text: '联系我们', href: 'mailto:hi@icoco.ai' },
{ text: '联系我们', href: 'https://openmax.com/' },
],
},
]
Expand All @@ -45,7 +45,7 @@ const columns = computed(() => {
{
title: 'Products',
links: [
{ text: 'Agent Cloud', href: 'https://icoco.ai/#pricing' },
{ text: 'Agent Cloud', href: 'https://openmax.com/' },
{ text: 'Zylos', href: 'https://github.com/zylos-ai' },
{ text: 'HxA Suite', href: 'https://github.com/coco-xyz' },
],
Expand All @@ -62,14 +62,14 @@ const columns = computed(() => {
title: 'Resources',
links: [
{ text: 'Docs', href: withBase('/') },
{ text: 'COCO', href: 'https://icoco.ai' },
{ text: 'OpenMax', href: 'https://openmax.com/' },
{ text: 'ZYLOS-Ai', href: 'https://github.com/zylos-ai' },
],
},
{
title: 'Company',
links: [
{ text: 'Contact', href: 'mailto:hi@icoco.ai' },
{ text: 'Contact', href: 'https://openmax.com/' },
],
},
]
Expand All @@ -87,8 +87,8 @@ const year = new Date().getFullYear()
<div class="footer-brand">
<a :href="withBase(isZh ? '/zh/' : '/')" class="footer-logo-link">
<img
:src="withBase(isDark ? '/coco-logo-yellow.png' : '/coco-logo-black.png')"
alt="COCO"
:src="withBase(isDark ? '/coco-logo-white.png' : '/coco-logo-black.png')"
alt="OpenMax"
class="footer-logo"
/>
</a>
Expand Down Expand Up @@ -123,13 +123,13 @@ const year = new Date().getFullYear()
</svg>
</a>
<!-- X/Twitter -->
<a href="https://x.com/CocoAIxyz" target="_blank" rel="noopener" class="social-link" title="X">
<a href="https://x.com/OpenMaxAI" target="_blank" rel="noopener" class="social-link" title="X">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>
</svg>
</a>
</div>
<p class="copyright">&copy; {{ year }} COCO. All rights reserved.</p>
<p class="copyright">&copy; {{ year }} OpenMax. All rights reserved.</p>
</div>
</div>
</footer>
Expand Down
8 changes: 4 additions & 4 deletions docs/.vitepress/theme/CocoHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ onUnmounted(() => {
<!-- Logo -->
<a :href="withBase(lang === 'zh-CN' ? '/zh/' : '/')" class="logo-link">
<img
:src="withBase(isDark ? '/coco-logo-yellow.png' : '/coco-logo-black.png')"
alt="COCO"
:src="withBase(isDark ? '/coco-logo-white.png' : '/coco-logo-black.png')"
alt="OpenMax"
class="logo-img"
/>
</a>
Expand Down Expand Up @@ -279,12 +279,12 @@ onUnmounted(() => {
background: #fff;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
transition: transform 0.3s;
color: #f59e0b;
color: #3297D7;
}
.toggle-thumb.dark {
transform: translateX(20px);
background: #374151;
color: #fbbf24;
color: #3297D7;
}
.mobile-menu-btn {
display: none;
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/theme/CustomLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ onMounted(() => {

<style>
.hero-highlight {
color: #E0A020;
color: #3297D7;
font-weight: 700;
}
.dark .hero-highlight {
color: #FFD646;
color: #3297D7;
}
</style>
Loading
Loading