Skip to content

Commit 76d2b92

Browse files
committed
feat: add docs
1 parent 488e5fa commit 76d2b92

40 files changed

Lines changed: 11297 additions & 2709 deletions

app/app.vue

Lines changed: 109 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,132 @@
11
<script setup lang="ts">
22
const { seo } = useAppConfig()
3+
const site = useSiteConfig()
34
45
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'))
56
const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('docs'), {
67
server: false
78
})
89
10+
const siteUrl = site.url || 'https://vercube.dev'
11+
const siteName = seo?.siteName || 'Vercube'
12+
913
useHead({
1014
meta: [
1115
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
1216
],
1317
link: [
14-
{ rel: 'icon', href: '/favicon.ico' }
18+
{ rel: 'icon', type: 'image/png', href: '/favicon-96x96.png', sizes: '96x96' },
19+
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
20+
{ rel: 'shortcut icon', href: '/favicon.ico' },
21+
{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' },
22+
{ rel: 'manifest', href: '/site.webmanifest' }
1523
],
1624
htmlAttrs: {
1725
lang: 'en'
1826
}
1927
})
2028
2129
useSeoMeta({
22-
titleTemplate: `%s - ${seo?.siteName}`,
23-
ogSiteName: seo?.siteName,
24-
twitterCard: 'summary_large_image'
30+
// Global defaults
31+
titleTemplate: `%s - ${siteName}`,
32+
ogSiteName: siteName,
33+
twitterCard: 'summary_large_image',
34+
twitterSite: '@vercubejs',
35+
twitterCreator: '@vercubejs',
36+
37+
// Open Graph defaults
38+
ogType: 'website',
39+
ogLocale: 'en_US',
40+
ogImage: `${siteUrl}/og-image.png`,
41+
ogImageWidth: 1200,
42+
ogImageHeight: 630,
43+
44+
// Application defaults
45+
applicationName: siteName,
46+
appleMobileWebAppTitle: siteName,
47+
appleMobileWebAppCapable: 'yes',
48+
appleMobileWebAppStatusBarStyle: 'black-translucent',
49+
50+
// Theme
51+
themeColor: '#000000',
52+
colorScheme: 'dark light',
53+
54+
// SEO defaults
55+
robots: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1',
56+
author: 'Vercube Team',
57+
58+
// Keywords (global)
59+
keywords: [
60+
'vercube',
61+
'javascript framework',
62+
'typescript framework',
63+
'server framework',
64+
'node.js',
65+
'bun',
66+
'deno',
67+
'dependency injection',
68+
'decorators',
69+
'routing',
70+
'middleware',
71+
'validation',
72+
'esm',
73+
'web-native',
74+
'request response',
75+
'serverless',
76+
'api framework',
77+
'modern javascript',
78+
'type-safe',
79+
'zero-config'
80+
].join(', ')
81+
})
82+
83+
// Global JSON-LD structured data
84+
useHead({
85+
script: [
86+
{
87+
type: 'application/ld+json',
88+
innerHTML: JSON.stringify({
89+
'@context': 'https://schema.org',
90+
'@type': 'WebSite',
91+
'name': 'Vercube',
92+
'url': siteUrl,
93+
'potentialAction': {
94+
'@type': 'SearchAction',
95+
'target': {
96+
'@type': 'EntryPoint',
97+
'urlTemplate': `${siteUrl}/docs?q={search_term_string}`
98+
},
99+
'query-input': 'required name=search_term_string'
100+
}
101+
})
102+
},
103+
{
104+
type: 'application/ld+json',
105+
innerHTML: JSON.stringify({
106+
'@context': 'https://schema.org',
107+
'@type': 'SoftwareApplication',
108+
'name': 'Vercube',
109+
'applicationCategory': 'DeveloperApplication',
110+
'operatingSystem': 'Node.js, Bun, Deno',
111+
'url': siteUrl,
112+
'author': {
113+
'@type': 'Organization',
114+
'name': 'Vercube',
115+
'url': 'https://github.com/vercube'
116+
},
117+
'offers': {
118+
'@type': 'Offer',
119+
'price': '0',
120+
'priceCurrency': 'USD'
121+
},
122+
'aggregateRating': {
123+
'@type': 'AggregateRating',
124+
'ratingValue': '5',
125+
'ratingCount': '1'
126+
}
127+
})
128+
}
129+
]
25130
})
26131
27132
provide('navigation', navigation)

app/pages/index.vue

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,45 @@ definePageMeta({
2323
colorMode: 'dark'
2424
})
2525
26-
const title = page.value.seo?.title || page.value.title
27-
const description = page.value.seo?.description || page.value.description
26+
const route = useRoute()
27+
const site = useSiteConfig()
2828
29+
const title = page.value.seo?.title || page.value.title || 'Vercube - Unleash your server development'
30+
const description = page.value.seo?.description || page.value.description || 'An ultra-efficient JavaScript server framework that runs anywhere - Node.js, Bun, or Deno - with unmatched flexibility and complete configurability for developers who refuse to sacrifice speed or control.'
31+
32+
const siteUrl = site.url || 'https://vercube.dev'
33+
const canonicalUrl = `${siteUrl}${route.path}`
34+
35+
// Define OG Image component for homepage
36+
defineOgImageComponent('Docs', {
37+
headline: 'Next generation server framework',
38+
title: 'Vercube',
39+
description: 'Unleash your server development with an ultra-efficient JavaScript framework'
40+
}, {
41+
fonts: ['Geist:400', 'Geist:600']
42+
})
43+
44+
// Homepage-specific SEO (overrides global defaults)
2945
useSeoMeta({
3046
titleTemplate: '',
3147
title,
32-
ogTitle: title,
3348
description,
49+
ogTitle: title,
3450
ogDescription: description,
35-
ogImage: 'https://ui.nuxt.com/assets/templates/nuxt/docs-light.png',
36-
twitterImage: 'https://ui.nuxt.com/assets/templates/nuxt/docs-light.png'
51+
ogUrl: canonicalUrl,
52+
ogImageAlt: title,
53+
twitterTitle: title,
54+
twitterDescription: description,
55+
twitterImageAlt: title
56+
})
57+
58+
// Canonical URL for homepage
59+
useHead({
60+
link: [
61+
{
62+
rel: 'canonical',
63+
href: canonicalUrl
64+
}
65+
]
3766
})
3867
</script>

0 commit comments

Comments
 (0)