feat: Implement initial VitePress documentation site with multi-language navigation and Open Graph metadata.

This commit is contained in:
dyzulk
2026-01-16 15:55:12 +07:00
parent 671ff606e1
commit 7a0c6cb5c3
3 changed files with 32 additions and 4 deletions

View File

@@ -8,11 +8,35 @@ export default defineConfig({
lang: 'en-US',
cleanUrls: true,
lastUpdated: true,
sitemap: {
hostname: 'https://docs.mivo.dyzulk.com'
},
head: [
['link', { rel: 'icon', href: '/logo-m.svg' }]
['link', { rel: 'icon', href: '/logo-m.svg' }],
['meta', { name: 'theme-color', content: '#0ea5e9' }],
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'og:site_name', content: 'MIVO' }],
['meta', { property: 'og:image', content: 'https://docs.mivo.dyzulk.com/og-image.png' }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
['meta', { name: 'twitter:image', content: 'https://docs.mivo.dyzulk.com/og-image.png' }],
['meta', { name: 'twitter:site', content: '@dyzulkdev' }]
],
transformHead: ({ pageData }) => {
const title = pageData.title ? `${pageData.title} | MIVO` : 'MIVO'
const description = pageData.description || "Modern Mikrotik Voucher Management System"
const url = `https://docs.mivo.dyzulk.com/${pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2')}`
return [
['meta', { property: 'og:title', content: title }],
['meta', { property: 'og:description', content: description }],
['meta', { property: 'og:url', content: url }],
['meta', { name: 'twitter:title', content: title }],
['meta', { name: 'twitter:description', content: description }],
]
},
// Shared theme config
themeConfig: {
logo: {
@@ -27,7 +51,7 @@ export default defineConfig({
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2026 DyzulkDev'
copyright: `Copyright © 2026${new Date().getFullYear() > 2026 ? ' - ' + new Date().getFullYear() : ''} DyzulkDev`
},
search: {

View File

@@ -8,7 +8,9 @@ export const navEn: DefaultTheme.NavItem[] = [
text: 'Community',
items: [
{ text: 'Changelog', link: 'https://github.com/dyzulk/mivo/releases' },
{ text: 'Contributing', link: 'https://github.com/dyzulk/mivo/blob/main/CONTRIBUTING.md' }
{ text: 'Contributing', link: 'https://github.com/dyzulk/mivo/blob/main/CONTRIBUTING.md' },
{ text: 'Forum (Issues)', link: 'https://github.com/dyzulk/mivo/issues' },
{ text: 'Star on GitHub', link: 'https://github.com/dyzulk/mivo/stargazers' }
]
}
]
@@ -21,7 +23,9 @@ export const navId: DefaultTheme.NavItem[] = [
text: 'Komunitas',
items: [
{ text: 'Catatan Rilis', link: 'https://github.com/dyzulk/mivo/releases' },
{ text: 'Kontribusi', link: 'https://github.com/dyzulk/mivo/blob/main/CONTRIBUTING.md' }
{ text: 'Kontribusi', link: 'https://github.com/dyzulk/mivo/blob/main/CONTRIBUTING.md' },
{ text: 'Forum (Issues)', link: 'https://github.com/dyzulk/mivo/issues' },
{ text: 'Beri Bintang', link: 'https://github.com/dyzulk/mivo/stargazers' }
]
}
]

BIN
docs/public/og-image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB