forked from pocketnetteam/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pocketnetteam:main' into main
- Loading branch information
Showing
234 changed files
with
6,308 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ node_modules/ | |
package-lock.json | ||
**/.DS_Store | ||
ui-bundle.zip | ||
**/.vscode | ||
**/dist | ||
**/.cache | ||
**/.temp |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"scripts": { | ||
"build": "npx antora --fetch antora.yml" | ||
}, | ||
"devDependencies": { | ||
"@antora/cli": "3.0.0", | ||
"@antora/site-generator": "3.0.0" | ||
}, | ||
"dependencies": { | ||
"@antora/lunr-extension": "^1.0.0-alpha.8" | ||
} | ||
} |
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<script setup lang="ts"> | ||
import { computed } from 'vue' | ||
const props = withDefaults( | ||
defineProps<{ | ||
/** package name */ | ||
package: string | ||
/** dist-tag to use */ | ||
distTag?: string | ||
}>(), | ||
{ | ||
distTag: 'next', | ||
}, | ||
) | ||
const badgeLink = computed( | ||
() => `https://www.npmjs.com/package/${props.package}`, | ||
) | ||
const badgeLabel = computed(() => { | ||
if (props.distTag) { | ||
return `${props.package}@${props.distTag}` | ||
} | ||
return props.package | ||
}) | ||
const badgeImg = computed( | ||
() => | ||
`https://badgen.net/npm/v/${props.package}/${ | ||
props.distTag | ||
}?label=${encodeURIComponent(badgeLabel.value)}`, | ||
) | ||
</script> | ||
|
||
<template> | ||
<a | ||
class="npm-badge" | ||
:href="badgeLink" | ||
:title="package" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<img :src="badgeImg" :alt="package" /> | ||
</a> | ||
</template> | ||
|
||
<style scoped> | ||
.npm-badge { | ||
margin-right: 0.5rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
import { createRequire } from 'node:module' | ||
import process from 'node:process' | ||
import { viteBundler } from '@vuepress/bundler-vite' | ||
import { webpackBundler } from '@vuepress/bundler-webpack' | ||
import { docsearchPlugin } from '@vuepress/plugin-docsearch' | ||
import { registerComponentsPlugin } from '@vuepress/plugin-register-components' | ||
import { shikiPlugin } from '@vuepress/plugin-shiki' | ||
import { defaultTheme } from '@vuepress/theme-default' | ||
import { defineUserConfig } from 'vuepress' | ||
import { getDirname, path } from 'vuepress/utils' | ||
import { | ||
head, | ||
navbarEn, | ||
navbarRu, | ||
sidebarEn, | ||
sidebarRu, | ||
} from './configs/index.js' | ||
|
||
const __dirname = getDirname(import.meta.url) | ||
const require = createRequire(import.meta.url) | ||
const isProd = process.env.NODE_ENV === 'production' | ||
|
||
export default defineUserConfig({ | ||
// set site base to default value | ||
base: '/', | ||
|
||
// extra tags in `<head>` | ||
head, | ||
|
||
// site-level locales config | ||
locales: { | ||
'/': { | ||
lang: 'en-US', | ||
title: 'Bastyon', | ||
description: 'This documentation will help you get started with Bastyon.', | ||
}, | ||
'/ru/': { | ||
lang: 'ru-RU', | ||
title: 'Bastyon', | ||
description: 'Эта документация поможет вам начать работу с Bastyon.', | ||
}, | ||
}, | ||
|
||
// specify bundler via environment variable | ||
bundler: | ||
process.env.DOCS_BUNDLER === 'webpack' ? webpackBundler() : viteBundler(), | ||
|
||
// configure default theme | ||
theme: defaultTheme({ | ||
hostname: 'https://docs.bastyon.com', | ||
logo: '/images/bastyon-logo-256x256.png', | ||
repo: '', // TODO repo | ||
docsRepo: '', // TODO docsRepo | ||
docsDir: 'docs', | ||
|
||
// theme-level locales config | ||
locales: { | ||
/** | ||
* English locale config | ||
* | ||
* As the default locale of @vuepress/theme-default is English, | ||
* we don't need to set all of the locale fields | ||
*/ | ||
'/': { | ||
// navbar | ||
navbar: navbarEn, | ||
// sidebar | ||
sidebar: sidebarEn, | ||
// page meta | ||
editLinkText: 'Edit this page on GitHub', | ||
}, | ||
|
||
/** | ||
* Russian locale config | ||
*/ | ||
'/ru/': { | ||
// navbar | ||
navbar: navbarRu, | ||
selectLanguageName: 'Русский', | ||
selectLanguageText: '选择语言', | ||
selectLanguageAriaLabel: '选择语言', | ||
// sidebar | ||
sidebar: sidebarRu, | ||
// page meta | ||
editLinkText: '在 GitHub 上编辑此页', | ||
lastUpdatedText: '上次更新', | ||
contributorsText: '贡献者', | ||
// custom containers | ||
tip: '提示', | ||
warning: '注意', | ||
danger: '警告', | ||
// 404 page | ||
notFound: [ | ||
'这里什么都没有', | ||
'我们怎么到这来了?', | ||
'这是一个 404 页面', | ||
'看起来我们进入了错误的链接', | ||
], | ||
backToHome: '返回首页', | ||
// a11y | ||
openInNewWindow: '在新窗口打开', | ||
toggleColorMode: '切换颜色模式', | ||
toggleSidebar: '切换侧边栏', | ||
}, | ||
}, | ||
|
||
themePlugins: { | ||
// only enable git plugin in production mode | ||
git: isProd, | ||
// use shiki plugin in production mode instead | ||
prismjs: !isProd, | ||
}, | ||
}), | ||
|
||
// configure markdown | ||
markdown: { | ||
importCode: { | ||
handleImportPath: (importPath) => { | ||
// handle @vuepress packages import path | ||
if (importPath.startsWith('@vuepress/')) { | ||
const packageName = importPath.match(/^(@vuepress\/[^/]*)/)![1] | ||
return importPath | ||
.replace( | ||
packageName, | ||
path.dirname(require.resolve(`${packageName}/package.json`)), | ||
) | ||
.replace('/src/', '/lib/') | ||
.replace(/hotKey\.ts$/, 'hotKey.d.ts') | ||
} | ||
return importPath | ||
}, | ||
}, | ||
}, | ||
|
||
// use plugins | ||
plugins: [ | ||
docsearchPlugin({ | ||
appId: '', // TODO appId | ||
apiKey: '', // TODO apiKey | ||
indexName: '', | ||
// searchParameters: { // TODO error? | ||
// facetFilters: ['tags:v2'], | ||
// }, | ||
locales: { | ||
|
||
}, | ||
}), | ||
registerComponentsPlugin({ | ||
componentsDir: path.resolve(__dirname, './components'), | ||
}), | ||
// only enable shiki plugin in production mode | ||
isProd | ||
? shikiPlugin({ | ||
langs: ['bash', 'diff', 'json', 'md', 'ts', 'vue'], | ||
theme: 'dark-plus', | ||
}) | ||
: [], | ||
], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import type { HeadConfig } from 'vuepress/core' | ||
|
||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
export const head: HeadConfig[] = [ | ||
[ | ||
'link', | ||
{ | ||
rel: 'icon', | ||
type: 'image/png', | ||
sizes: '16x16', | ||
href: `/images/icons/favicon-16x16.png`, | ||
}, | ||
], | ||
[ | ||
'link', | ||
{ | ||
rel: 'icon', | ||
type: 'image/png', | ||
sizes: '32x32', | ||
href: `/images/icons/favicon-32x32.png`, | ||
}, | ||
], | ||
['link', { rel: 'manifest', href: '/manifest.webmanifest' }], | ||
['meta', { name: 'application-name', content: 'VuePress' }], | ||
['meta', { name: 'apple-mobile-web-app-title', content: 'VuePress' }], | ||
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], | ||
[ | ||
'link', | ||
{ rel: 'apple-touch-icon', href: `/images/icons/apple-touch-icon.png` }, | ||
], | ||
[ | ||
'link', | ||
{ | ||
rel: 'mask-icon', | ||
href: '/images/icons/safari-pinned-tab.svg', | ||
color: '#3eaf7c', | ||
}, | ||
], | ||
['meta', { name: 'msapplication-TileColor', content: '#3eaf7c' }], | ||
['meta', { name: 'theme-color', content: '#3eaf7c' }], | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './head.js' | ||
export * from './navbar/index.js' | ||
export * from './sidebar/index.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { createRequire } from 'node:module' | ||
import { fs } from 'vuepress/utils' | ||
|
||
const require = createRequire(import.meta.url) | ||
|
||
export const VERSION = ( | ||
fs.readJsonSync(require.resolve('vuepress/package.json')) as { | ||
version: string | ||
} | ||
).version |
Oops, something went wrong.