Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/maven/org.apache.maven.plugins-ma…
Browse files Browse the repository at this point in the history
…ven-surefire-plugin-3.3.0
  • Loading branch information
brenoepics authored Jun 26, 2024
2 parents 75beb26 + 142a5cb commit 7980f67
Show file tree
Hide file tree
Showing 29 changed files with 3,620 additions and 263 deletions.
99 changes: 28 additions & 71 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,77 +1,29 @@
import {defineConfigWithTheme} from 'vitepress'
import type {ThemeConfig} from 'vitepress-carbon'
import { defineConfigWithTheme } from 'vitepress'
import type { ThemeConfig } from 'vitepress-carbon'
import baseConfig from 'vitepress-carbon/config'
import { version } from '../package.json'
import { sidebar } from './sidebar.mjs'

const nav = [
const nav: NavItem[] = [
{
text: 'Docs',
text: 'Guide',
activeMatch: `^/(guide|examples)/`,
items: [
{text: 'Guide', link: '/guide/introduction'},
{text: 'Examples', link: '/examples/'},
{text: 'Error Reference', link: '/error-reference/'},
{text: 'JavaDoc', link: 'https://brenoepics.github.io/at4j/javadoc/'}
{ text: 'Introduction', link: '/guide/introduction' },
{ text: 'Examples', link: '/examples/' },
{ text: 'Error Reference', link: '/error-reference/' }
]
},
{
text: 'About',
activeMatch: `^/about/`,
items: [
{text: 'FAQ', link: '/about/faq'},
{text: 'Releases', link: '/about/releases'},
{text: 'Code of Conduct', link: '/about/coc'}
]
text: `JavaDoc`,
link: 'https://brenoepics.github.io/at4j/javadoc/'
},
{
text: 'v' + version,
activeMatch: '^/$',
link: 'https://github.com/brenoepics/at4j/releases'
}
]
const sidebar = {
'/guide/': [
{
text: 'Getting Started',
items: [
{text: 'Introduction', link: '/guide/introduction'},
{
text: 'Download/Installation',
link: '/guide/installation'
},
{
text: `Generating an Azure Translator Key`,
link: '/guide/azure-subscription'
},
{
text: 'Basic Usage',
link: '/guide/basic-usage'
},
{
text: 'Threading',
link: '/guide/threading'
},
{
text: 'Examples',
link: '/examples/'
}
]
}
],
'/examples/': [
{
text: 'Basic',
items: [
{
text: 'Translate Hello World',
link: '/examples/#translator'
},
{
text: 'Detect Language',
link: '/examples/#detect'
},
{
text: 'Guide',
link: '/guide/introduction'
}
]
}
]
}

// https://vitepress.dev/reference/site-config
export default defineConfigWithTheme<ThemeConfig>({
Expand All @@ -92,10 +44,11 @@ export default defineConfigWithTheme<ThemeConfig>({
}
},
head: [
['meta', {name: 'theme-color', content: '#3c8772'}],
['meta', {property: 'og:url', content: 'https://github.com/brenoepics/at4j'}],
['meta', {property: 'og:type', content: 'Repository'}],
['meta', {property: 'og:title', content: 'AT4J'}],
['link', { rel: 'icon', href: '/at4j/favicon.svg' }],
['meta', { name: 'theme-color', content: '#0089D3' }],
['meta', { property: 'og:url', content: 'https://github.com/brenoepics/at4j' }],
['meta', { property: 'og:type', content: 'Repository' }],
['meta', { property: 'og:title', content: 'AT4J' }],
[
'meta',
{
Expand All @@ -104,11 +57,15 @@ export default defineConfigWithTheme<ThemeConfig>({
}
]
],

themeConfig: {
nav,
sidebar,

logo: {
alt: 'AT4J Logo',
src: '/favicon.svg'
},

search: {
provider: 'algolia',
options: {
Expand All @@ -127,7 +84,7 @@ export default defineConfigWithTheme<ThemeConfig>({
},
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'}
{ icon: 'github', link: 'https://github.com/brenoepics/at4j' }
],

editLink: {
Expand All @@ -138,5 +95,5 @@ export default defineConfigWithTheme<ThemeConfig>({
footer: {
message: 'Apache 2.0 Licensed'
}
},
}
})
85 changes: 85 additions & 0 deletions docs/.vitepress/sidebar.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

import type { DefaultTheme } from 'vitepress'


const guideGroupItems: DefaultTheme.NavItem[] = [
{
text: 'Introduction',
link: '/guide/introduction'
},
{
text: 'Installation',
link: '/guide/installation'
},
{
text: 'Basic Usage',
link: '/guide/basic-usage'
}
]

const examplesItems: DefaultTheme.NavItem[] = [
{
text: 'Translator',
link: '/examples/#translator'
},
{
text: 'Detect',
link: '/examples/#detect'
},
{
text: 'Translate JSON',
link: '/examples/#json'
}
]

const essentialItems: DefaultTheme.NavItem[] = [
{
text: 'Completable Futures',
link: '/essential/completable-futures'
},
{
text: 'Optionals',
link: '/essential/optionals'
},
{
text: 'Error Handling',
link: '/essential/error-handling'
},
{
text: 'Logging',
link: '/essential/logging'
}
]

const azureItems: DefaultTheme.NavItem[] = [
{
text: 'Azure Subscription',
link: '/guide/azure-subscription'
},
{
text: 'Available Languages',
link: '/azure-reference/languages'
},
{
text: 'Error Reference',
link: '/error-reference/'
}
]

const advancedItems: DefaultTheme.NavItem[] = [
{
text: 'Threading',
link: '/advanced/threading'
},
{
text: 'Caching',
link: '/advanced/caching'
}
]
export const sidebar: DefaultTheme.Sidebar = [
{ text: 'Guide', items: guideGroupItems },
{ text: 'Essential Knowledge', collapsed: true, items: essentialItems },
{ text: 'Examples', collapsed: true, items: examplesItems },
{ text: 'Advanced Usage', collapsed: true, items: advancedItems },
{ text: 'Azure Reference', collapsed: true, items: azureItems },
]
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "at4j-docs",
"version": "1.0.0",
"version": "1.2.0",
"description": "Azure Translator for Java docs",
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
},
"dependencies": {
"vitepress-carbon": "^1.3.1"
"vitepress-carbon": "^1.3.2"
}
}
128 changes: 0 additions & 128 deletions docs/src/about/coc.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/src/about/faq.md

This file was deleted.

Loading

0 comments on commit 7980f67

Please sign in to comment.