import { defineConfig } from 'vitepress' // https://vitepress.dev/reference/site-config export default defineConfig({ base: "/ua-parser-js/docs/v2/", title: "UAParser.js", titleTemplate: 'Detect Browser, OS, CPU, & Device with JavaScript', description: "Detect Browser, OS, CPU, & Device with JavaScript", head: [[ 'link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/images/logo.png" }], ['script', {}, 'window?.localStorage?.setItem("vitepress-theme-appearance", window?.localStorage?.getItem("vitepress-theme-appearance") ?? "dark")'], ], appearance : 'dark', lastUpdated : true, themeConfig: { // https://vitepress.dev/reference/default-theme-config logo: '/images/logo.png', nav: [ { text: 'Home', link: '/' }, { text: '2.0.0-alpha', items: [ { text: 'Changelog', link: 'https://github.com/faisalman/ua-parser-js/blob/master/changelog.md' }, { text: 'Contributing', link: 'https://github.com/faisalman/ua-parser-js#development' } ] } ], sidebar: [ { text: 'Introduction', collapsed: false, items: [ { text: 'Why UAParser.js', link: '/intro/why-ua-parser-js' }, { text: 'Quick Start', link: '/intro/quick-start/quick-start', collapsed: true, items: [ { text: 'Using HTML', link: '/intro/quick-start/using-html' }, { text: 'Using Node.js', link: '/intro/quick-start/using-node-js' }, { text: 'Using ES Modules', link: '/intro/quick-start/using-es-modules' }, { text: 'Using TypeScript', link: '/intro/quick-start/using-typescript' }, { text: 'Using jQuery', link: '/intro/quick-start/using-jquery' }, ] }, { text: 'Extending Regex', link: '/intro/extending-regex' }, ] }, { text: 'API Reference', items: [ { text: 'UAParser', collapsed: false, link: '/api/ua-parser-js/overview', items: [ { text: 'Overview', link: '/api/ua-parser-js/overview' }, { text: 'getBrowser()', link: '/api/ua-parser-js/get-browser' }, { text: 'getCPU()', link: '/api/ua-parser-js/get-cpu' }, { text: 'getDevice()', link: '/api/ua-parser-js/get-device' }, { text: 'getEngine()', link: '/api/ua-parser-js/get-engine' }, { text: 'getOS()', link: '/api/ua-parser-js/get-os' }, { text: 'getResult()', link: '/api/ua-parser-js/get-result' }, { text: 'getUA()', link: '/api/ua-parser-js/get-ua' }, { text: 'setUA()', link: '/api/ua-parser-js/set-ua' }, { text: 'IData', collapsed: true, items: [ { text: 'is()', link: '/api/idata/is' }, { text: 'toString()', link: '/api/idata/to-string' }, { text: 'withClientHints()', link: '/api/idata/with-client-hints' }, { text: 'withFeatureCheck()', link: '/api/idata/with-feature-check' } ] } ] } ] }, { text: 'Submodules', items: [ { text: 'ua-parser-js/enums', link: '/api/submodules/enums' }, { text: 'ua-parser-js/extensions', link: '/api/submodules/extensions' }, { text: 'ua-parser-js/maps', link: '/api/submodules/maps' } ] } ], socialLinks: [ { icon: { svg: 'GitHub' }, link: 'https://github.com/faisalman/ua-parser-js' }, { icon: { svg: 'npm' }, link: 'https://www.npmjs.com/package/ua-parser-js' }, { icon: { svg: 'Open Collective' }, link: 'https://opencollective.com/ua-parser-js' }, { icon: { svg: 'Demo' }, link: 'https://faisalman.github.io/ua-parser-js' }, ], carbonAds: { code: 'your-carbon-code', placement: 'your-carbon-placement' }, footer: { message: 'Licensed under the MIT License.', copyright: 'Copyright © 2012-2023 Faisal Salman' }, lastUpdatedText : 'Updated Date', editLink: { pattern: 'https://github.com/faisalman/ua-parser-js/tree/gh-pages/docs/v2/:path', text: 'Edit this page on GitHub' } }, markdown: { lineNumbers: true, // adjust how header anchors are generated, // useful for integrating with tools that use different conventions anchors: { slugify(str) { return encodeURIComponent(str) } } } })