build: exclude docs from type-aware linting
All checks were successful
Build and deploy docs / build (push) Successful in 1m31s
Tests / test-deno (push) Successful in 1m50s
Tests / test-bun (push) Successful in 2m0s
Tests / test-node (node22) (push) Successful in 2m10s
Tests / test-node (node20) (push) Successful in 2m13s
Tests / test-node (node18) (push) Successful in 2m16s
Tests / test-web (chromium) (push) Successful in 2m13s
Tests / test-web (firefox) (push) Successful in 2m22s
Build and deploy typedoc / build (push) Successful in 6m16s
Tests / lint (push) Successful in 6m54s
Tests / e2e (push) Successful in 52s
Tests / e2e-deno (push) Successful in 1m3s
All checks were successful
Build and deploy docs / build (push) Successful in 1m31s
Tests / test-deno (push) Successful in 1m50s
Tests / test-bun (push) Successful in 2m0s
Tests / test-node (node22) (push) Successful in 2m10s
Tests / test-node (node20) (push) Successful in 2m13s
Tests / test-node (node18) (push) Successful in 2m16s
Tests / test-web (chromium) (push) Successful in 2m13s
Tests / test-web (firefox) (push) Successful in 2m22s
Build and deploy typedoc / build (push) Successful in 6m16s
Tests / lint (push) Successful in 6m54s
Tests / e2e (push) Successful in 52s
Tests / e2e-deno (push) Successful in 1m3s
This commit is contained in:
parent
4ca670a6a2
commit
33302a1f4c
3 changed files with 136 additions and 136 deletions
|
@ -1,132 +1,135 @@
|
|||
import { defineConfig, HeadConfig } from "vitepress";
|
||||
import markdownItFootnotes from "markdown-it-footnote";
|
||||
import type { HeadConfig } from 'vitepress'
|
||||
import markdownItFootnotes from 'markdown-it-footnote'
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
// 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" },
|
||||
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,
|
||||
]
|
||||
: []),
|
||||
],
|
||||
['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
|
||||
transformHtml(code) {
|
||||
if (mode !== 'production') return code
|
||||
|
||||
// this is a hack but whatever
|
||||
return code.replace(
|
||||
'<body>',
|
||||
'<body><noscript><div><img src="https://tei.su/zond.php?website=968f50a2-4cf8-4e31-9f40-1abd48ba2086" style="position:absolute; left:-9999px;" alt="" /></div></noscript>'
|
||||
)
|
||||
},
|
||||
themeConfig: {
|
||||
// this is a hack but whatever
|
||||
return code.replace(
|
||||
'<body>',
|
||||
'<body><noscript><div><img src="https://tei.su/zond.php?website=968f50a2-4cf8-4e31-9f40-1abd48ba2086" style="position:absolute; left:-9999px;" alt="" /></div></noscript>',
|
||||
)
|
||||
},
|
||||
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: `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Telegram</title><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></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" },
|
||||
nav: [
|
||||
{ text: 'Guide', link: '/guide/' },
|
||||
{ text: 'Reference', link: '//ref.mtcute.dev' },
|
||||
],
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/mtcute' },
|
||||
{
|
||||
text: "MTProto vs Bot API",
|
||||
link: "/guide/intro/mtproto-vs-bot-api",
|
||||
icon: {
|
||||
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Telegram</title><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg>',
|
||||
},
|
||||
link: 'https://t.me/mt_cute',
|
||||
},
|
||||
{ text: "FAQ", link: "/guide/intro/faq" },
|
||||
],
|
||||
],
|
||||
search: {
|
||||
provider: 'local',
|
||||
},
|
||||
{
|
||||
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" },
|
||||
],
|
||||
editLink: {
|
||||
pattern: 'https://github.com/mtcute/docs/edit/master/:path',
|
||||
},
|
||||
{
|
||||
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" },
|
||||
],
|
||||
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 <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a><br/>'
|
||||
+ 'Logo by <a href="//t.me/AboutTheDot">@dotvhs</a><br/>'
|
||||
+ '© Copyright 2021-present, <a href="//github.com/teidesu">teidesu</a> ❤️',
|
||||
},
|
||||
{
|
||||
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 <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a><br/>' +
|
||||
'Logo by <a href="//t.me/AboutTheDot">@dotvhs</a><br/>' +
|
||||
'© Copyright 2021-present, <a href="//github.com/teidesu">teidesu</a> ❤️',
|
||||
markdown: {
|
||||
config: (md) => {
|
||||
md.use(markdownItFootnotes)
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
markdown: {
|
||||
config: (md) => {
|
||||
md.use(markdownItFootnotes);
|
||||
},
|
||||
},
|
||||
});
|
||||
})
|
||||
|
|
|
@ -1,30 +1,26 @@
|
|||
// https://vitepress.dev/guide/custom-theme
|
||||
import type { Theme } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
|
||||
import vitepressBackToTop from 'vitepress-plugin-back-to-top'
|
||||
import 'vitepress-plugin-back-to-top/dist/style.css'
|
||||
|
||||
// @ts-ignore
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import EmbedPost from '../components/EmbedPost.vue'
|
||||
// @ts-ignore
|
||||
import VImg from '../components/VImg.vue'
|
||||
// @ts-ignore
|
||||
|
||||
import Tag from '../components/Tag.vue'
|
||||
// @ts-ignore
|
||||
import VImg from '../components/VImg.vue'
|
||||
import Layout from './Layout.vue'
|
||||
import 'vitepress-plugin-back-to-top/dist/style.css'
|
||||
|
||||
import './style.css'
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
Layout,
|
||||
enhanceApp({ app, router, siteData }) {
|
||||
app.component('v-img', VImg)
|
||||
app.component('EmbedPost', EmbedPost)
|
||||
app.component('Tag', Tag)
|
||||
vitepressBackToTop({
|
||||
threshold: 300
|
||||
})
|
||||
}
|
||||
extends: DefaultTheme,
|
||||
Layout,
|
||||
enhanceApp({ app }) {
|
||||
app.component('v-img', VImg)
|
||||
app.component('EmbedPost', EmbedPost)
|
||||
app.component('Tag', Tag)
|
||||
vitepressBackToTop({
|
||||
threshold: 300,
|
||||
})
|
||||
},
|
||||
} satisfies Theme
|
||||
|
|
|
@ -9,6 +9,7 @@ export default antfu({
|
|||
ignoresTypeAware: [
|
||||
'.config/**/*',
|
||||
'e2e/**',
|
||||
'docs/**',
|
||||
],
|
||||
overrides: {
|
||||
'ts/consistent-type-imports': 'off',
|
||||
|
|
Loading…
Reference in a new issue