import { defineConfig, HeadConfig } from "vitepress"; import markdownItFootnotes from "markdown-it-footnote"; // https://vitepress.dev/reference/site-config export default ({ mode }) => defineConfig({ title: "mtcute", description: "mtcute documentation", lastUpdated: true, head: [ ["meta", { name: "theme-color", content: "#e9a1d9" }], ["meta", { name: "apple-mobile-web-app-capable", content: "yes" }], [ "meta", { name: "apple-mobile-web-app-status-bar-style", content: "black" }, ], ['link', { rel: 'icon', href: '/mtcute-logo.png' }], ['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Fredoka:wght@500&text=mtcute' }], ...(mode === 'production' ? [ ['script', { async: '', src: 'https://zond.tei.su/script.js', 'data-website-id': '968f50a2-4cf8-4e31-9f40-1abd48ba2086' }] as HeadConfig ] : []), ], transformHtml(code) { if (mode !== 'production') return code // this is a hack but whatever return code.replace( '
', '' ) }, themeConfig: { // https://vitepress.dev/reference/default-theme-config nav: [ { text: "Guide", link: "/guide/" }, { text: "Reference", link: "//ref.mtcute.dev" }, ], socialLinks: [ { icon: "github", link: "https://github.com/mtcute" }, { icon: { svg: ``, }, link: "https://t.me/mt_cute", }, ], search: { provider: "local", }, editLink: { pattern: "https://github.com/mtcute/docs/edit/master/:path", }, outline: { level: "deep", }, sidebar: { "/guide/": [ { text: "Getting started", items: [ { text: "Quick start", link: "/guide/" }, { text: "Signing in", link: "/guide/intro/sign-in" }, { text: "Updates", link: "/guide/intro/updates" }, { text: "Errors", link: "/guide/intro/errors" }, { text: "MTProto vs Bot API", link: "/guide/intro/mtproto-vs-bot-api", }, { text: "FAQ", link: "/guide/intro/faq" }, ], }, { text: "Topics", items: [ { text: "Peers", link: "/guide/topics/peers" }, { text: "Storage", link: "/guide/topics/storage" }, { text: "Transport", link: "/guide/topics/transport" }, { text: "Parse modes", link: "/guide/topics/parse-modes" }, { text: "Files", link: "/guide/topics/files" }, { text: "Keyboards", link: "/guide/topics/keyboards" }, { text: "Inline mode", link: "/guide/topics/inline-mode" }, { text: "Conversation", link: "/guide/topics/conversation" }, { text: "Raw API", link: "/guide/topics/raw-api" }, ], }, { text: "Dispatcher", items: [ { text: "Intro", link: "/guide/dispatcher/intro" }, { text: "Handlers", link: "/guide/dispatcher/handlers" }, { text: "Filters", link: "/guide/dispatcher/filters" }, { text: "Groups & Propagation", link: "/guide/dispatcher/groups-propagation", }, { text: "Errors", link: "/guide/dispatcher/errors" }, { text: "Middlewares", link: "/guide/dispatcher/middlewares" }, { text: "Inline mode", link: "/guide/dispatcher/inline-mode" }, { text: "State", link: "/guide/dispatcher/state" }, { text: "Rate limit", link: "/guide/dispatcher/rate-limit" }, { text: "Child Dispatchers", link: "/guide/dispatcher/children" }, { text: "Scenes", link: "/guide/dispatcher/scenes" }, { text: "Dependency Injection", link: "/guide/dispatcher/di" }, ], }, { text: 'Advanced', items: [ { text: "Tree-shaking", link: "/guide/advanced/treeshaking" }, { text: "Workers", link: "/guide/advanced/workers" }, { text: "Converting sessions", link: "/guide/advanced/session-convert" }, { text: "Network middlewares", link: "/guide/advanced/net-middlewares" }, ] } ], }, footer: { message: "mtcute is not affiliated with Telegram.", copyright: 'This documentation is licensed under CC BY 4.0