diff --git a/.vitepress/config/en.ts b/.vitepress/config/en.ts index e3da69c..9375a97 100644 --- a/.vitepress/config/en.ts +++ b/.vitepress/config/en.ts @@ -1,6 +1,5 @@ import type { DefaultTheme, LocaleConfig } from 'vitepress' import type { Theme } from '../theme/types' -import { components } from '../theme/plugins/component' import 'dotenv/config' export const SITE_NAME = 'Kotatsu Website' @@ -65,8 +64,6 @@ export const config: LocaleConfig = { message: "GPL-3.0 Licensed | Privacy policy", copyright: `Copyright © 2020 - ${new Date().getFullYear()} Kotatsu Developers`, }, - - components: components.filter(component => component.path.startsWith('components/')), }, } } @@ -80,10 +77,10 @@ function defaultSidebar(): DefaultTheme.SidebarItem[] { text: "Download", link: "/download/", }, - { + /* { text: "Parsers", link: "/parsers/", - }, + }, */ { text: "Changelogs", link: "/changelogs/", @@ -209,7 +206,7 @@ function getNav(): DefaultTheme.NavItem[] { link: "/manuals/guides/getting-started", activeMatch: "/manuals/", }, - { + /* { text: "News", link: "/news/", activeMatch: "/news/", @@ -218,6 +215,6 @@ function getNav(): DefaultTheme.NavItem[] { text: "Account", link: "/account/", activeMatch: "/account/" - } + } */ ] } \ No newline at end of file diff --git a/.vitepress/config/hooks/generateMeta.ts b/.vitepress/config/hooks/generateMeta.ts index 6cecaed..89a2bee 100644 --- a/.vitepress/config/hooks/generateMeta.ts +++ b/.vitepress/config/hooks/generateMeta.ts @@ -1,5 +1,5 @@ import type { HeadConfig, TransformContext } from "vitepress" -import type { DocsPageData } from '../../theme/plugins/component' +import type { DocsPageData } from '../../theme/plugins/section' function generateMeta(context: TransformContext, hostname: string) { const head: HeadConfig[] = [] diff --git a/.vitepress/config/index.ts b/.vitepress/config/index.ts index d3ba884..d9dd45f 100644 --- a/.vitepress/config/index.ts +++ b/.vitepress/config/index.ts @@ -1,15 +1,13 @@ import type { Theme } from '../theme/types' -import type { DocsPageData } from '../theme/plugins/component' -import { type HeadConfig, defineConfigWithTheme } from 'vitepress' +import { defineConfigWithTheme } from 'vitepress' import { config as ru, searchLocale as searchLocaleRu } from './ru' import { config as root, searchLocale as searchLocaleEn } from './en' import { config as ua, searchLocale as searchLocaleUa } from './ua' import { addPlugins } from '../theme/plugins/markdown' -import { components, prepareData } from '../theme/plugins/component' +import { sections, prepareData } from '../theme/plugins/section' import { slugify } from 'transliteration' import { fileURLToPath, URL } from 'node:url' import { telegram } from '../../website/icons' -import { normalize } from 'vitepress/dist/client/shared' import { tabsMarkdownPlugin } from "vitepress-plugin-tabs" import pluginRewriteAll from 'vite-plugin-rewrite-all'; @@ -63,7 +61,7 @@ export default defineConfigWithTheme({ ['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap' }], ['link', { rel: 'icon', href: '/favicon.ico?v=2', sizes: 'any' }], - ['link', { rel: 'icon', href: '/icon.svg?v=2', type: 'image/svg+xml' }], + ['link', { rel: 'icon', href: '/logo.svg?v=2', type: 'image/svg+xml' }], ['link', { rel: 'apple-touch-icon', href: '/apple-touch-icon.png?v=2' }], ['link', { rel: 'manifest', href: '/site.webmanifest' }], ], @@ -87,9 +85,16 @@ export default defineConfigWithTheme({ search: { provider: 'local', + options: { + locales: { + ...searchLocaleEn, + ...searchLocaleRu, + ...searchLocaleUa, + }, + }, }, - components, + sections, }, locales: { diff --git a/.vitepress/config/ru.ts b/.vitepress/config/ru.ts index 6f43eb7..758aec0 100644 --- a/.vitepress/config/ru.ts +++ b/.vitepress/config/ru.ts @@ -1,6 +1,5 @@ import type { DefaultTheme, LocaleConfig } from 'vitepress' import type { Theme } from '../theme/types' -import { components } from '../theme/plugins/component' import 'dotenv/config' export const SITE_NAME = 'Kotatsu Website' @@ -75,8 +74,6 @@ export const config: LocaleConfig = { message: "Лицензия GPL-3.0 | Политика конфиденциальности", copyright: `Copyright © 2020 - ${new Date().getFullYear()} Kotatsu Developers`, }, - - components: components.filter(component => component.path.startsWith('ru/components/')), }, } } diff --git a/.vitepress/config/shortcodes.ts b/.vitepress/config/shortcodes.ts index ca79d3b..83f50cd 100644 --- a/.vitepress/config/shortcodes.ts +++ b/.vitepress/config/shortcodes.ts @@ -1,3 +1,10 @@ +import { type Ref, computed } from 'vue' +import { type PageData, useData } from 'vitepress' + +export interface Data { + lang: Ref +} + const iconMappings = { about: 'information-outline', bookmark: 'bookmark-outline', diff --git a/.vitepress/config/ua.ts b/.vitepress/config/ua.ts index 784c838..a2182a5 100644 --- a/.vitepress/config/ua.ts +++ b/.vitepress/config/ua.ts @@ -1,6 +1,6 @@ import type { DefaultTheme, LocaleConfig } from 'vitepress' import type { Theme } from '../theme/types' -import { components } from '../theme/plugins/component' +import { sections } from '../theme/plugins/section' export const SITE_NAME = 'Kotatsu Website' export const META_DESCRIPTION = 'Проста і зручна читалка манги з відкритим вихідним кодом від спільноти і для спільноти, де ви можете знайти і читати вашу улюблену мангу простіше як ніколи.' @@ -73,8 +73,6 @@ export const config: LocaleConfig = { message: "Ліцензія GPL-3.0 | Політика конфіденційності", copyright: `Copyright © 2020 - ${new Date().getFullYear()} Kotatsu Developers`, }, - - components: components.filter(component => component.path.startsWith('ru/components/')), } } } diff --git a/.vitepress/theme/components/Breadcrumbs.vue b/.vitepress/theme/components/Breadcrumbs.vue index 7f90e2f..16419ff 100644 --- a/.vitepress/theme/components/Breadcrumbs.vue +++ b/.vitepress/theme/components/Breadcrumbs.vue @@ -1,7 +1,7 @@