Skip to content

Commit

Permalink
docs: fix new theme
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics committed Feb 20, 2024
1 parent 87958a0 commit 67efcce
Show file tree
Hide file tree
Showing 20 changed files with 35 additions and 332 deletions.
43 changes: 6 additions & 37 deletions docs/.vitepress/config.ts → docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import { defineConfigWithTheme, DefaultTheme } from 'vitepress'
import { replaceTextPlugin } from './replaceTextPlugin'
import { AT4J_VERSION, AT4JRelease } from './repository'
import baseConfig from 'vitepress-carbon/config'
import { defineConfigWithTheme } from 'vitepress'
import type { ThemeConfig } from 'vitepress-carbon'
import baseConfig from 'vitepress-carbon/config'

const REPO_VERSION: string = await AT4J_VERSION()

const nav: DefaultTheme.NavItem[] = [
const nav = [
{
text: 'Docs',
activeMatch: `^/(guide|examples)/`,
Expand All @@ -22,24 +18,12 @@ const nav: DefaultTheme.NavItem[] = [
activeMatch: `^/about/`,
items: [
{ text: 'FAQ', link: '/about/faq' },
{ text: 'Team', link: '/about/team' },
{ text: 'Releases', link: '/about/releases' },
{ text: 'Code of Conduct', link: '/about/coc' }
]
},
{
text: `Latest Release: ${REPO_VERSION}`,
items: [
{
text: 'GitHub Release',
link: AT4JRelease?.html_url ? AT4JRelease.html_url : 'https://github.com/brenoepics/at4j/releases'
},
{ text: 'Maven Central', link: 'https://mvnrepository.com/artifact/io.github.brenoepics/at4j/latest' }
]
}
]

export const sidebar = {
const sidebar = {
'/guide/': [
{
text: 'Getting Started',
Expand Down Expand Up @@ -85,6 +69,7 @@ export const sidebar = {
]
}

// https://vitepress.dev/reference/site-config
export default defineConfigWithTheme<ThemeConfig>({
extends: baseConfig,
lang: 'en-US',
Expand Down Expand Up @@ -120,7 +105,7 @@ export default defineConfigWithTheme<ThemeConfig>({
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"><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'
},
Expand All @@ -137,20 +122,4 @@ export default defineConfigWithTheme<ThemeConfig>({
message: 'Apache 2.0 Licensed'
}
},

markdown: {
config(md) {
md.use(replaceTextPlugin, 'AT4J-VERSION', REPO_VERSION)
}
},

vite: {
build: {
minify: 'terser',
chunkSizeWarningLimit: Infinity
},
json: {
stringify: true
}
}
})
20 changes: 0 additions & 20 deletions docs/.vitepress/github/Author.ts

This file was deleted.

23 changes: 0 additions & 23 deletions docs/.vitepress/github/Release.ts

This file was deleted.

10 changes: 0 additions & 10 deletions docs/.vitepress/replaceTextPlugin.ts

This file was deleted.

29 changes: 0 additions & 29 deletions docs/.vitepress/repository.ts

This file was deleted.

5 changes: 4 additions & 1 deletion docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
import { VPCarbon } from 'vitepress-carbon'
export default VPCarbon

// uncomment to test CSS variables override
// import './override.css'
export default VPCarbon
Empty file.
8 changes: 4 additions & 4 deletions docs/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module 'vitepress-carbon/config' {
import { UserConfig } from 'vitepress'
const config: () => Promise<UserConfig>
export default config
}
import { UserConfig } from 'vitepress'
const config: () => Promise<UserConfig>
export default config
}
14 changes: 5 additions & 9 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"type": "module",
"name": "vitepress-carbon-template",
"version": "0.0.1",
"description": "VitePress Carbon Template",
"scripts": {
"dev": "vitepress",
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
},
"dependencies": {
"axios": "^1.6.7",
"vitepress-carbon": "^1.0.0"
},
"devDependencies": {
"@types/markdown-it": "^12.2.3",
"@types/node": "^20.10.1",
"terser": "^5.14.2"
"vitepress-carbon": "1.0.2"
}
}
10 changes: 0 additions & 10 deletions docs/src/about/team.md

This file was deleted.

26 changes: 0 additions & 26 deletions docs/src/about/team/Member.ts

This file was deleted.

105 changes: 0 additions & 105 deletions docs/src/about/team/TeamList.vue

This file was deleted.

35 changes: 0 additions & 35 deletions docs/src/about/team/TeamPage.vue

This file was deleted.

10 changes: 0 additions & 10 deletions docs/src/about/team/members.json

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 67efcce

Please sign in to comment.