diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 9566dd8..c404836 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,6 +1,8 @@ -import { DefaultTheme, defineConfig } from 'vitepress' +import { defineConfigWithTheme, DefaultTheme } from 'vitepress' import { replaceTextPlugin } from './replaceTextPlugin' import { AT4J_VERSION, AT4JRelease } from './repository' +import baseConfig from 'vitepress-carbon/config' +import type { ThemeConfig } from 'vitepress-carbon/config' const REPO_VERSION: string = await AT4J_VERSION() @@ -83,7 +85,8 @@ export const sidebar = { ] } -export default defineConfig({ +export default defineConfigWithTheme<ThemeConfig>({ + extends: baseConfig, lang: 'en-US', title: 'AT4J', description: 'AT4J - Azure Translator for Java', @@ -112,11 +115,13 @@ export default defineConfig({ provider: 'local' }, + outline: [2, 3], socialLinks: [ { icon: { - svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Postman</title><path fill="#EF5B25" d="M13.527.099C6.955-.744.942 3.9.099 10.473c-.843 6.572 3.8 12.584 10.373 13.428 6.573.843 12.587-3.801 13.428-10.374C24.744 6.955 20.101.943 13.527.099zm2.471 7.485a.855.855 0 0 0-.593.25l-4.453 4.453-.307-.307-.643-.643c4.389-4.376 5.18-4.418 5.996-3.753zm-4.863 4.861l4.44-4.44a.62.62 0 1 1 .847.903l-4.699 4.125-.588-.588zm.33.694l-1.1.238a.06.06 0 0 1-.067-.032.06.06 0 0 1 .01-.073l.645-.645.512.512zm-2.803-.459l1.172-1.172.879.878-1.979.426a.074.074 0 0 1-.085-.039.072.072 0 0 1 .013-.093zm-3.646 6.058a.076.076 0 0 1-.069-.083.077.077 0 0 1 .022-.046h.002l.946-.946 1.222 1.222-2.123-.147zm2.425-1.256a.228.228 0 0 0-.117.256l.203.865a.125.125 0 0 1-.211.117h-.003l-.934-.934-.294-.295 3.762-3.758 1.82-.393.874.874c-1.255 1.102-2.971 2.201-5.1 3.268zm5.279-3.428h-.002l-.839-.839 4.699-4.125a.952.952 0 0 0 .119-.127c-.148 1.345-2.029 3.245-3.977 5.091zm3.657-6.46l-.003-.002a1.822 1.822 0 0 1 2.459-2.684l-1.61 1.613a.119.119 0 0 0 0 .169l1.247 1.247a1.817 1.817 0 0 1-2.093-.343zm2.578 0a1.714 1.714 0 0 1-.271.218h-.001l-1.207-1.207 1.533-1.533c.661.72.637 1.832-.054 2.522zM18.855 6.05a.143.143 0 0 0-.053.157.416.416 0 0 1-.053.45.14.14 0 0 0 .023.197.141.141 0 0 0 .084.03.14.14 0 0 0 .106-.05.691.691 0 0 0 .087-.751.138.138 0 0 0-.194-.033z"/></svg>' }, + svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Postman</title><path fill="#EF5B25" d="M13.527.099C6.955-.744.942 3.9.099 10.473c-.843 6.572 3.8 12.584 10.373 13.428 6.573.843 12.587-3.801 13.428-10.374C24.744 6.955 20.101.943 13.527.099zm2.471 7.485a.855.855 0 0 0-.593.25l-4.453 4.453-.307-.307-.643-.643c4.389-4.376 5.18-4.418 5.996-3.753zm-4.863 4.861l4.44-4.44a.62.62 0 1 1 .847.903l-4.699 4.125-.588-.588zm.33.694l-1.1.238a.06.06 0 0 1-.067-.032.06.06 0 0 1 .01-.073l.645-.645.512.512zm-2.803-.459l1.172-1.172.879.878-1.979.426a.074.074 0 0 1-.085-.039.072.072 0 0 1 .013-.093zm-3.646 6.058a.076.076 0 0 1-.069-.083.077.077 0 0 1 .022-.046h.002l.946-.946 1.222 1.222-2.123-.147zm2.425-1.256a.228.228 0 0 0-.117.256l.203.865a.125.125 0 0 1-.211.117h-.003l-.934-.934-.294-.295 3.762-3.758 1.82-.393.874.874c-1.255 1.102-2.971 2.201-5.1 3.268zm5.279-3.428h-.002l-.839-.839 4.699-4.125a.952.952 0 0 0 .119-.127c-.148 1.345-2.029 3.245-3.977 5.091zm3.657-6.46l-.003-.002a1.822 1.822 0 0 1 2.459-2.684l-1.61 1.613a.119.119 0 0 0 0 .169l1.247 1.247a1.817 1.817 0 0 1-2.093-.343zm2.578 0a1.714 1.714 0 0 1-.271.218h-.001l-1.207-1.207 1.533-1.533c.661.72.637 1.832-.054 2.522zM18.855 6.05a.143.143 0 0 0-.053.157.416.416 0 0 1-.053.45.14.14 0 0 0 .023.197.141.141 0 0 0 .084.03.14.14 0 0 0 .106-.05.691.691 0 0 0 .087-.751.138.138 0 0 0-.194-.033z"/></svg>' + }, link: 'https://www.postman.com/maintenance-astronaut-2993290/workspace/brenoepics/collection/18589822-dfe7a640-9b94-47a8-b19f-46cb9cc8843e?action=share&creator=18589822' }, { icon: 'github', link: 'https://github.com/brenoepics/at4j' } @@ -134,28 +139,12 @@ export default defineConfig({ }, markdown: { - theme: 'github-dark', config(md) { md.use(replaceTextPlugin, 'AT4J-VERSION', REPO_VERSION) } }, vite: { - optimizeDeps: { - include: ['gsap', 'dynamics.js'], - exclude: ['@vue/repl'] - }, - // @ts-ignore - ssr: { - external: ['@vue/repl'] - }, - server: { - host: true, - fs: { - // for when developing with locally linked theme - allow: ['../..'] - } - }, build: { minify: 'terser', chunkSizeWarningLimit: Infinity diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index f8d2a64..7cead69 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,17 +1,2 @@ -// https://vitepress.dev/guide/custom-theme -import { h } from 'vue' -import type { Theme } from 'vitepress' -import DefaultTheme from 'vitepress/theme' -import './styles/index.css' - -export default { - extends: DefaultTheme, - Layout: () => { - return h(DefaultTheme.Layout, null, { - // https://vitepress.dev/guide/extending-default-theme#layout-slots - }) - }, - enhanceApp({ app, router, siteData }) { - // ... - } -} satisfies Theme +import { VPCarbon } from 'vitepress-carbon' +export default VPCarbon diff --git a/docs/.vitepress/theme/styles/index.css b/docs/.vitepress/theme/styles/index.css deleted file mode 100644 index ee92c60..0000000 --- a/docs/.vitepress/theme/styles/index.css +++ /dev/null @@ -1 +0,0 @@ -@import "./utilities.css"; diff --git a/docs/.vitepress/theme/styles/utilities.css b/docs/.vitepress/theme/styles/utilities.css deleted file mode 100644 index 8e3e5d7..0000000 --- a/docs/.vitepress/theme/styles/utilities.css +++ /dev/null @@ -1,15 +0,0 @@ -:root { - --vp-c-brand: #008AD7!important; - --vp-c-brand-light: #0097ec!important; - --vp-c-brand-1: #0097ec!important; - --vp-c-brand-dark: #0079bd!important; - --vp-c-brand-highlight: #006398!important; - --vp-c-green: #0097ec!important; - - --vt-c-brand: #008AD7!important; - --vt-c-brand-light: #0097ec!important; - --vt-c-brand-1: #0097ec!important; - --vt-c-brand-dark: #0079bd!important; - --vt-c-brand-highlight: #006398!important; - --vt-c-green: #0097ec!important; -} diff --git a/docs/env.d.ts b/docs/env.d.ts new file mode 100644 index 0000000..62c6a76 --- /dev/null +++ b/docs/env.d.ts @@ -0,0 +1,5 @@ +declare module 'vitepress-carbon/config' { + import { UserConfig } from 'vitepress' + const config: () => Promise<UserConfig> + export default config +} diff --git a/docs/package.json b/docs/package.json index fa4520a..239ae6e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,4 @@ { - "engines": { - "node": ">=14.0.0" - }, "type": "module", "scripts": { "dev": "vitepress", @@ -10,28 +7,11 @@ }, "dependencies": { "axios": "^1.6.7", - "dynamics.js": "^1.1.5", - "gsap": "^3.9.0", - "vitepress": "1.0.0-rc.33", - "vue": "^3.4.0" + "vitepress-carbon": "^1.0.0" }, "devDependencies": { "@types/markdown-it": "^12.2.3", "@types/node": "^20.10.1", "terser": "^5.14.2" - }, - "pnpm": { - "overrides": { - "@vitejs/plugin-vue": "5.0.0-beta.1" - }, - "peerDependencyRules": { - "ignoreMissing": [ - "@algolia/client-search", - "react", - "react-dom", - "@types/react", - "search-insights" - ] - } } } diff --git a/docs/tsconfig.json b/docs/tsconfig.json index ca0b2e4..eb94dde 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -9,10 +9,7 @@ "allowJs": true, "strict": true, "jsx": "preserve", - "baseUrl": ".", - "paths": { - "@theme/*": [".vitepress/theme/*"] - } + "baseUrl": "." }, "include": ["env.d.ts", "src/**/*", ".vitepress/**/*"] }