mirror of
https://github.com/aNNiMON/Own-Programming-Language-Tutorial.git
synced 2024-09-20 00:34:20 +03:00
Add search plugin, build docs task
This commit is contained in:
parent
9581c09e79
commit
b719420770
1
docs/.gitignore
vendored
1
docs/.gitignore
vendored
@ -2,4 +2,5 @@ node_modules
|
||||
.temp
|
||||
.cache
|
||||
docs/.vuepress/configs/modules.js
|
||||
docs/.vuepress/dist/
|
||||
docs/*/modules/
|
||||
|
@ -30,12 +30,20 @@ tasks.register('generateMarkdownModules') {
|
||||
|
||||
tasks.register('runDocsDev', Exec) {
|
||||
group = "documentation"
|
||||
description = "Run sample program"
|
||||
description = "Start docs dev server"
|
||||
dependsOn generateMarkdownModules
|
||||
workingDir '../docs/docs'
|
||||
commandLine 'pnpm', 'docs:dev'
|
||||
}
|
||||
|
||||
tasks.register('buildDocs', Exec) {
|
||||
group = "documentation"
|
||||
description = "Build docs to static site"
|
||||
dependsOn generateMarkdownModules
|
||||
workingDir '../docs/docs'
|
||||
commandLine 'pnpm', 'docs:build'
|
||||
}
|
||||
|
||||
tasks.register('generateModuleInfo', JavaExec) {
|
||||
group = "documentation"
|
||||
description = "Run sample program"
|
||||
|
@ -2,6 +2,7 @@ import { defineUserConfig, defaultTheme } from 'vuepress'
|
||||
import { getDirname, path } from '@vuepress/utils'
|
||||
import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
|
||||
import { prismjsPlugin } from '@vuepress/plugin-prismjs'
|
||||
import { searchPlugin } from '@vuepress/plugin-search'
|
||||
import { sidebarConfig } from './configs/sidebar'
|
||||
import { navbarConfig } from './configs/navbar'
|
||||
import Prism from 'prismjs';
|
||||
@ -11,6 +12,7 @@ definePrismOwnLang(Prism)
|
||||
const __dirname = getDirname(import.meta.url)
|
||||
|
||||
export default defineUserConfig({
|
||||
base: "/docs/ownlang/",
|
||||
locales: {
|
||||
'/en/': {
|
||||
lang: 'en-US',
|
||||
@ -50,6 +52,12 @@ export default defineUserConfig({
|
||||
}),
|
||||
registerComponentsPlugin({
|
||||
componentsDir: path.resolve(__dirname, './components'),
|
||||
})
|
||||
}),
|
||||
searchPlugin({
|
||||
locales: {
|
||||
'/en/': { placeholder: 'Search' },
|
||||
'/ru/': { placeholder: 'Поиск' },
|
||||
},
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
@ -7,7 +7,7 @@ actions:
|
||||
- text: 🇺🇸 English
|
||||
link: /en/
|
||||
type: primary
|
||||
- text: 🇷🇺 Русский
|
||||
- text: 🇪🇷 Русский
|
||||
link: /ru/
|
||||
type: primary
|
||||
footer: © 2024 aNNiMON
|
||||
|
@ -7,13 +7,18 @@
|
||||
"docs:dev": "vuepress dev docs",
|
||||
"docs:build": "vuepress build docs"
|
||||
},
|
||||
"keywords": ["documentation", "ownlang", "programming-language"],
|
||||
"keywords": [
|
||||
"documentation",
|
||||
"ownlang",
|
||||
"programming-language"
|
||||
],
|
||||
"author": "aNNiMON",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@vuepress/client": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-prismjs": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-register-components": "2.0.0-rc.0",
|
||||
"@vuepress/plugin-search": "2.0.0-rc.0",
|
||||
"@vuepress/utils": "2.0.0-rc.0",
|
||||
"prismjs": "^1.29.0",
|
||||
"vue": "^3.3.8",
|
||||
|
@ -14,6 +14,9 @@ devDependencies:
|
||||
'@vuepress/plugin-register-components':
|
||||
specifier: 2.0.0-rc.0
|
||||
version: 2.0.0-rc.0
|
||||
'@vuepress/plugin-search':
|
||||
specifier: 2.0.0-rc.0
|
||||
version: 2.0.0-rc.0
|
||||
'@vuepress/utils':
|
||||
specifier: 2.0.0-rc.0
|
||||
version: 2.0.0-rc.0
|
||||
@ -831,6 +834,22 @@ packages:
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@vuepress/plugin-search@2.0.0-rc.0:
|
||||
resolution: {integrity: sha512-1ikJUgIN+7QrcAftxpWUKTrNVHEN2+k/az0Sjz7Ok7EthMHcG6qQsIb+AoK4WIQMsJkwVPLxwym/M1FbBTZDWQ==}
|
||||
dependencies:
|
||||
'@vuepress/client': 2.0.0-rc.0
|
||||
'@vuepress/core': 2.0.0-rc.0
|
||||
'@vuepress/shared': 2.0.0-rc.0
|
||||
'@vuepress/utils': 2.0.0-rc.0
|
||||
chokidar: 3.5.3
|
||||
vue: 3.3.8
|
||||
vue-router: 4.2.5(vue@3.3.8)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- supports-color
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@vuepress/plugin-theme-data@2.0.0-rc.0:
|
||||
resolution: {integrity: sha512-FXY3/Ml+rM6gNKvwdBF6vKAcwnSvtXCzKgQwJAw3ppQTKUkLcbOxqM+h4d8bzHWAAvdnEvQFug5uEZgWllBQbA==}
|
||||
dependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user