|
| 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 | +import vite from './vite.config' |
| 6 | + |
| 7 | +// https://vitepress.dev/reference/site-config |
| 8 | +const analyticsHead: HeadConfig[] = [ |
| 9 | + [ |
| 10 | + 'script', |
| 11 | + { |
| 12 | + 'src': 'https://cdn.usefathom.com/script.js', |
| 13 | + 'data-site': 'EVVUGSUE', |
| 14 | + 'defer': '', |
| 15 | + }, |
| 16 | + ], |
| 17 | +] |
| 18 | + |
| 19 | +const nav = [ |
| 20 | + { text: 'News', link: 'https://stacksjs.org/news' }, |
| 21 | + { text: 'Changelog', link: 'https://github.com/stacksjs/vite-plugin-dotenvx/releases' }, |
| 22 | + { |
| 23 | + text: 'Resources', |
| 24 | + items: [ |
| 25 | + { text: 'Team', link: '/team' }, |
| 26 | + { text: 'Sponsors', link: '/sponsors' }, |
| 27 | + { text: 'Partners', link: '/partners' }, |
| 28 | + { text: 'Postcardware', link: '/postcardware' }, |
| 29 | + { text: 'License', link: '/license' }, |
| 30 | + { |
| 31 | + items: [ |
| 32 | + { text: 'Awesome Stacks', link: 'https://github.com/stacksjs/awesome-stacks' }, |
| 33 | + { text: 'Contributing', link: 'https://github.com/stacksjs/vite-plugin-dotenvx/blob/main/.github/CONTRIBUTING.md' }, |
| 34 | + ], |
| 35 | + }, |
| 36 | + ], |
| 37 | + }, |
| 38 | +] |
| 39 | + |
| 40 | +const sidebar = [ |
| 41 | + { |
| 42 | + text: 'Get Started', |
| 43 | + items: [ |
| 44 | + { text: 'Intro', link: '/intro' }, |
| 45 | + { text: 'Install', link: '/install' }, |
| 46 | + { text: 'Usage', link: '/usage' }, |
| 47 | + ], |
| 48 | + }, |
| 49 | + { |
| 50 | + text: 'Examples', |
| 51 | + items: [ |
| 52 | + { text: 'Basic Usage', link: '/examples/basic-usage' }, |
| 53 | + { text: 'Multiple Environments', link: '/examples/multi-environment' }, |
| 54 | + { text: 'Encrypted Environments', link: '/examples/encrypted-envs' }, |
| 55 | + { text: 'Variable Expansion', link: '/examples/variable-expansion' }, |
| 56 | + { text: 'Command Substitution', link: '/examples/command-substitution' }, |
| 57 | + { text: 'Advanced Configuration', link: '/examples/advanced-configuration' }, |
| 58 | + ], |
| 59 | + }, |
| 60 | + { text: 'Showcase', link: '/Showcase' }, |
| 61 | +] |
| 62 | + |
| 63 | +export default withPwa( |
| 64 | + defineConfig({ |
| 65 | + lang: 'en-US', |
| 66 | + title: 'vite-plugin-dotenvx', |
| 67 | + description: 'A Vite plugin to seamlessly integrate with dotenvx.', |
| 68 | + cleanUrls: true, |
| 69 | + lastUpdated: true, |
| 70 | + metaChunk: true, |
| 71 | + |
| 72 | + head: [ |
| 73 | + ['link', { rel: 'icon', type: 'image/svg+xml', href: './images/logo-mini.svg' }], |
| 74 | + ['link', { rel: 'icon', type: 'image/png', href: './images/logo.png' }], |
| 75 | + // meta info |
| 76 | + ['meta', { name: 'theme-color', content: '#0A0ABC' }], |
| 77 | + ['meta', { name: 'title', content: 'vite-plugin-dotenvx | A Vite plugin to seamlessly integrate with dotenvx.' }], |
| 78 | + ['meta', { name: 'description', content: 'A Vite plugin to seamlessly integrate with dotenvx.' }], |
| 79 | + ['meta', { name: 'author', content: 'Stacks.js, Inc.' }], |
| 80 | + ['meta', { name: 'tags', content: 'vite, vite-plugin, dotenvx, dotenv, environment, variables, development, lightweight' }], |
| 81 | + // open graph |
| 82 | + ['meta', { property: 'og:type', content: 'website' }], |
| 83 | + ['meta', { property: 'og:locale', content: 'en' }], |
| 84 | + ['meta', { property: 'og:title', content: 'vite-plugin-dotenvx | A Vite plugin to seamlessly integrate with dotenvx.' }], |
| 85 | + ['meta', { property: 'og:site_name', content: 'vite-plugin-dotenvx' }], |
| 86 | + ['meta', { property: 'og:image', content: '/images/og-image.png' }], |
| 87 | + ['meta', { |
| 88 | + property: 'og:description', |
| 89 | + content: 'A Vite plugin to seamlessly integrate with dotenvx.', |
| 90 | + }], |
| 91 | + ['meta', { property: 'og:url', content: 'https://vite-plugin-dotenvx.netlify.app/' }], |
| 92 | + ...analyticsHead, |
| 93 | + ], |
| 94 | + |
| 95 | + themeConfig: { |
| 96 | + search: { |
| 97 | + provider: 'local', |
| 98 | + }, |
| 99 | + logo: { |
| 100 | + light: './images/logo-transparent.svg', |
| 101 | + dark: './images/logo-white-transparent.svg', |
| 102 | + }, |
| 103 | + |
| 104 | + nav, |
| 105 | + sidebar, |
| 106 | + |
| 107 | + editLink: { |
| 108 | + pattern: 'https://github.com/stacksjs/stacks/edit/main/docs/docs/:path', |
| 109 | + text: 'Edit this page on GitHub', |
| 110 | + }, |
| 111 | + |
| 112 | + footer: { |
| 113 | + message: 'Released under the MIT License.', |
| 114 | + copyright: 'Copyright © 2025-present Stacks.js, Inc.', |
| 115 | + }, |
| 116 | + |
| 117 | + socialLinks: [ |
| 118 | + { icon: 'twitter', link: 'https://twitter.com/stacksjs' }, |
| 119 | + { icon: 'bluesky', link: 'https://bsky.app/profile/chrisbreuer.dev' }, |
| 120 | + { icon: 'github', link: 'https://github.com/stacksjs/vite-plugin-dotenvx' }, |
| 121 | + { icon: 'discord', link: 'https://discord.gg/stacksjs' }, |
| 122 | + ], |
| 123 | + |
| 124 | + // algolia: services.algolia, |
| 125 | + |
| 126 | + // carbonAds: { |
| 127 | + // code: '', |
| 128 | + // placement: '', |
| 129 | + // }, |
| 130 | + }, |
| 131 | + |
| 132 | + pwa: { |
| 133 | + manifest: { |
| 134 | + theme_color: '#0A0ABC', |
| 135 | + }, |
| 136 | + }, |
| 137 | + |
| 138 | + markdown: { |
| 139 | + theme: { |
| 140 | + light: 'github-light', |
| 141 | + dark: 'github-dark', |
| 142 | + }, |
| 143 | + |
| 144 | + codeTransformers: [ |
| 145 | + transformerTwoslash(), |
| 146 | + ], |
| 147 | + }, |
| 148 | + |
| 149 | + vite, |
| 150 | + }), |
| 151 | +) |
0 commit comments