|
| 1 | +import type { HeadConfig } from 'vitepress' |
| 2 | +import { transformerTwoslash } from '@shikijs/vitepress-twoslash' |
| 3 | +import { withPwa } from '@vite-pwa/vitepress' |
| 4 | +import { defineConfig } from 'vitepress' |
| 5 | + |
| 6 | +import viteConfig from './vite.config' |
| 7 | + |
| 8 | +// https://vitepress.dev/reference/site-config |
| 9 | + |
| 10 | +const analyticsHead: HeadConfig[] = [ |
| 11 | + [ |
| 12 | + 'script', |
| 13 | + { |
| 14 | + 'src': 'https://cdn.usefathom.com/script.js', |
| 15 | + 'data-site': 'EGVEPJYT', |
| 16 | + 'defer': '', |
| 17 | + }, |
| 18 | + ], |
| 19 | +] |
| 20 | + |
| 21 | +const nav = [ |
| 22 | + { |
| 23 | + text: 'Changelog', |
| 24 | + link: 'https://github.com/stacksjs/ts-spreadsheets/blob/main/CHANGELOG.md', |
| 25 | + }, |
| 26 | + // { text: 'Blog', link: 'https://updates.ow3.org' }, |
| 27 | + { |
| 28 | + text: 'Resources', |
| 29 | + items: [ |
| 30 | + { text: 'Team', link: '/team' }, |
| 31 | + { text: 'Sponsors', link: '/sponsors' }, |
| 32 | + { text: 'Partners', link: '/partners' }, |
| 33 | + { text: 'Postcardware', link: '/postcardware' }, |
| 34 | + { |
| 35 | + items: [ |
| 36 | + { |
| 37 | + text: 'Awesome Stacks', |
| 38 | + link: 'https://github.com/stacksjs/awesome-stacks', |
| 39 | + }, |
| 40 | + { |
| 41 | + text: 'Contributing', |
| 42 | + link: 'https://github.com/stacksjs/stacks/blob/main/.github/CONTRIBUTING.md', |
| 43 | + }, |
| 44 | + ], |
| 45 | + }, |
| 46 | + ], |
| 47 | + }, |
| 48 | +] |
| 49 | + |
| 50 | +const sidebar = [ |
| 51 | + { |
| 52 | + text: 'Get Started', |
| 53 | + items: [ |
| 54 | + { text: 'Introduction', link: '/intro' }, |
| 55 | + { text: 'Install', link: '/install' }, |
| 56 | + { text: 'Usage', link: '/usage' }, |
| 57 | + ], |
| 58 | + }, |
| 59 | +] |
| 60 | + |
| 61 | +export default withPwa( |
| 62 | + defineConfig({ |
| 63 | + lang: 'en-US', |
| 64 | + title: 'ts-spreadsheets', |
| 65 | + description: 'Easily generate spreadsheets, like CSVs and Excel files.', |
| 66 | + metaChunk: true, |
| 67 | + cleanUrls: true, |
| 68 | + |
| 69 | + head: [ |
| 70 | + ['link', { rel: 'icon', type: 'image/svg+xml', href: './images/logo-mini.svg' }], |
| 71 | + ['link', { rel: 'icon', type: 'image/png', href: './images/logo.png' }], |
| 72 | + ['meta', { name: 'theme-color', content: '#0A0ABC' }], |
| 73 | + ['meta', { property: 'og:type', content: 'website' }], |
| 74 | + ['meta', { property: 'og:locale', content: 'en' }], |
| 75 | + ['meta', { property: 'og:title', content: 'ts-spreadsheets | Easily generate spreadsheets, like CSVs and Excel files.' }], |
| 76 | + ['meta', { property: 'og:site_name', content: 'ts-spreadsheets' }], |
| 77 | + ['meta', { property: 'og:image', content: './images/og-image.jpg' }], |
| 78 | + ['meta', { property: 'og:url', content: 'https://ts-spreadsheets.netlify.app/' }], |
| 79 | + // ['script', { 'src': 'https://cdn.usefathom.com/script.js', 'data-site': '', 'data-spa': 'auto', 'defer': '' }], |
| 80 | + ...analyticsHead, |
| 81 | + ], |
| 82 | + |
| 83 | + themeConfig: { |
| 84 | + logo: './images/logo-transparent.svg', |
| 85 | + |
| 86 | + nav, |
| 87 | + sidebar, |
| 88 | + |
| 89 | + editLink: { |
| 90 | + pattern: 'https://github.com/stacksjs/stacks/edit/main/docs/docs/:path', |
| 91 | + text: 'Edit this page on GitHub', |
| 92 | + }, |
| 93 | + |
| 94 | + footer: { |
| 95 | + message: 'Released under the MIT License.', |
| 96 | + copyright: 'Copyright © 2024-present Stacks.js, Inc.', |
| 97 | + }, |
| 98 | + |
| 99 | + socialLinks: [ |
| 100 | + { icon: 'twitter', link: 'https://twitter.com/stacksjs' }, |
| 101 | + { icon: 'bluesky', link: 'https://bsky.app/profile/chrisbreuer.dev' }, |
| 102 | + { icon: 'github', link: 'https://github.com/stacksjs/ts-spreadsheets' }, |
| 103 | + { icon: 'discord', link: 'https://discord.gg/stacksjs' }, |
| 104 | + ], |
| 105 | + |
| 106 | + // algolia: services.algolia, |
| 107 | + |
| 108 | + // carbonAds: { |
| 109 | + // code: '', |
| 110 | + // placement: '', |
| 111 | + // }, |
| 112 | + }, |
| 113 | + |
| 114 | + pwa: { |
| 115 | + manifest: { |
| 116 | + theme_color: '#0A0ABC', |
| 117 | + }, |
| 118 | + }, |
| 119 | + |
| 120 | + markdown: { |
| 121 | + theme: { |
| 122 | + light: 'vitesse-light', |
| 123 | + dark: 'vitesse-dark', |
| 124 | + }, |
| 125 | + |
| 126 | + codeTransformers: [ |
| 127 | + transformerTwoslash(), |
| 128 | + ], |
| 129 | + }, |
| 130 | + |
| 131 | + vite: viteConfig, |
| 132 | + }), |
| 133 | +) |
0 commit comments