refactor: update deps

- added built-in search feature
- updated readme
- updated to newest version of vitepress
This commit is contained in:
DaOfficialWizard 2023-09-26 16:22:04 +01:00
parent ee321e51f0
commit 8e3b15fa02
5 changed files with 812 additions and 785 deletions

View File

@ -13,25 +13,25 @@ Please visit the [documentation site](https://docs.eyetrackvr.dev/) for more inf
### install dependencies ### install dependencies
```bash ```bash
cd vitepress && yarn cd vitepress && pnpm install
``` ```
### start dev server ### start dev server
```bash ```bash
yarn dev pnpm dev
``` ```
### Build ### Build
```bash ```bash
yarn build pnpm build
``` ```
### Serve ### Serve
```bash ```bash
yarn serve pnpm serve
``` ```
## Contribute ## Contribute

View File

@ -4,97 +4,132 @@
//import MyLayout from '../../vue/MyLayout.vue' //import MyLayout from '../../vue/MyLayout.vue'
const theme = { const theme = {
logo: { logo: {
light: '/logo_light.png', dark: '/logo.svg', alt: 'EyeTrackVR Logo' light: "/logo_light.png",
dark: "/logo.svg",
alt: "EyeTrackVR Logo",
},
siteTitle: "EyeTrackVR Docs",
/* Note the footer will not show when sidebar is active */
search: {
provider: "local",
},
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2022-present ETVR",
},
nav: [
{
text: "About",
items: [
{ text: "About Us", link: "/about" },
{ text: "Development Road Map", link: "/dev_roadmap" },
],
}, },
siteTitle: 'EyeTrackVR Docs', { text: "Contact", link: "/contact" },
/* Note the footer will not show when sidebar is active */ ],
footer: { sidebar: [
message: "Released under the MIT License.", {
copyright: "Copyright © 2022-present ETVR", text: "Getting Started",
collapsible: true,
items: [
{ text: "Introduction", link: "/getting_started/intro" },
{
text: "Things to know before you start",
link: "/getting_started/things_to_know",
},
{ text: "LED Safety", link: "/getting_started/led_safety" },
],
}, },
nav: [ {
text: "How to Build",
collapsible: true,
items: [
{ text: "Full Build Guide", link: "/how_to_build/full_build" },
{ text: "Part List", link: "/how_to_build/parts_list" },
{ {
text: 'About', text: "How to Create your own Camera Mount",
items: [ link: "/how_to_build/creating_your_own_mount",
{ text: 'About Us', link: '/about' },
{ text: 'Development Road Map', link: '/dev_roadmap' },
]
}, },
{ text: "Contact", link: "/contact" }, ],
], },
sidebar: [ {
text: "Firmware Guide",
collapsible: true,
items: [
{ text: "Introduction", link: "/firmware_guide/firmware" },
{ {
text: "Getting Started", text: "Setup Visual Studio Code environment",
collapsible: true, link: "/firmware_guide/setup_vscode",
items: [
{ text: "Introduction", link: "/getting_started/intro" },
{ text: "Things to know before you start", link: "/getting_started/things_to_know" },
{ text: "LED Safety", link: "/getting_started/led_safety" },
],
}, },
{ {
text: "How to Build", text: "Configuring Firmware",
collapsible: true, link: "/firmware_guide/configure_firmware",
items: [
{ text: "Full Build Guide", link: "/how_to_build/full_build" },
{ text: "Part List", link: "/how_to_build/parts_list" },
{ text: "How to Create your own Camera Mount", link: "/how_to_build/creating_your_own_mount" },
],
}, },
{ {
text: "Firmware Guide", text: "Uploading and Updating the Firmware",
collapsible: true, link: "/firmware_guide/upload_and_update_firmware",
items: [
{ text: "Introduction", link: "/firmware_guide/firmware" },
{ text: "Setup Visual Studio Code environment", link: "/firmware_guide/setup_vscode" },
{ text: "Configuring Firmware", link: "/firmware_guide/configure_firmware" },
{ text: "Uploading and Updating the Firmware", link: "/firmware_guide/upload_and_update_firmware" },
{ text: "Updating PlatformIO", link: "/firmware_guide/update_platformio" },
{ text: "Firmware Environments", link: "/firmware_guide/environments" },
{ text: "MDNS", link: "/firmware_guide/mdns" },
{ text: "REST API", link: "/firmware_guide/rest_api" },
],
}, },
{ {
text: "Software Guide", text: "Updating PlatformIO",
collapsible: true, link: "/firmware_guide/update_platformio",
items: [ },
{ text: "Installing and setting up the ETVR App", link: "/software_guide/eyetrackvr_app_guide" }, { text: "Firmware Environments", link: "/firmware_guide/environments" },
{ text: "Building the app from source", link: "/software_guide/build_software" }, { text: "MDNS", link: "/firmware_guide/mdns" },
{ text: "Setting up OSC recenter/recalibrate", link: "/software_guide/osc_setup" }, { text: "REST API", link: "/firmware_guide/rest_api" },
], ],
},
{
text: "Software Guide",
collapsible: true,
items: [
{
text: "Installing and setting up the ETVR App",
link: "/software_guide/eyetrackvr_app_guide",
}, },
{ {
text: "Miscellaneous", text: "Building the app from source",
collapsible: true, link: "/software_guide/build_software",
items: [
{ text: "VR Chat Avatar Setup", link: "/misc/vrc_avatar_setup" },
{ text: "FAQ", link: "/misc/faq" },
],
}, },
{ {
text: "Development", text: "Setting up OSC recenter/recalibrate",
collapsible: true, link: "/software_guide/osc_setup",
items: [
{ text: "Docs", link: "/development/docs/dev_docs" },
{ text: "Edit Docs", link: "/development/docs/pages" },
{ text: "Standards", link: "/development/docs/standards" },
],
}, },
],
},
{
text: "Miscellaneous",
collapsible: true,
items: [
{ text: "VR Chat Avatar Setup", link: "/misc/vrc_avatar_setup" },
{ text: "FAQ", link: "/misc/faq" },
],
},
{
text: "Development",
collapsible: true,
items: [
{ text: "Docs", link: "/development/docs/dev_docs" },
{ text: "Edit Docs", link: "/development/docs/pages" },
{ text: "Standards", link: "/development/docs/standards" },
],
},
{
text: "Archive",
collapsible: true,
items: [
{ {
text: "Archive", text: "Prepare to solder IR LED PCB V2's",
collapsible: true, link: "/archive/fox_ir_v2_build_instructions",
items: [
{ text: "Prepare to solder IR LED PCB V2's", link: "/archive/fox_ir_v2_build_instructions" },
],
}, },
], ],
socialLinks: [ },
{ icon: 'github', link: 'https://github.com/EyeTrackVR/EyeTrackVR' }, ],
{ icon: 'discord', link: 'https://discord.gg/kkXYbVykZX' } socialLinks: [
] { icon: "github", link: "https://github.com/EyeTrackVR/EyeTrackVR" },
} { icon: "discord", link: "https://discord.gg/kkXYbVykZX" },
],
};
const ThemeSettings = {} const ThemeSettings = {}

View File

@ -1,22 +0,0 @@
//vite.config.ts
import { SearchPlugin } from "vitepress-plugin-search";
import { defineConfig } from "vite";
// https://github.com/nextapps-de/flexsearch#options
var flexSearchIndexOptions = {
preset: "score",
cache: 1000,
context: true,
}
//default options
var options = {
...flexSearchIndexOptions,
previewLength: 62,
buttonLabel: "Search",
placeholder: "Search docs",
};
export default defineConfig({
plugins: [SearchPlugin(options)],
});

View File

@ -15,15 +15,14 @@
"update-deps": "pnpm up -Li" "update-deps": "pnpm up -Li"
}, },
"devDependencies": { "devDependencies": {
"@types/flexsearch": "^0.7.3", "@types/flexsearch": "^0.7.4",
"flexsearch": "^0.7.31", "flexsearch": "^0.7.31",
"markdown-it": "^13.0.1", "markdown-it": "^13.0.1",
"postcss": "^8.4.24", "postcss": "^8.4.30",
"postcss-flexbugs-fixes": "^5.0.2", "postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^8.4.2", "postcss-preset-env": "^9.1.4",
"tailwindcss": "^3.3.2", "tailwindcss": "^3.3.3",
"vitepress": "1.0.0-beta.1", "vitepress": "1.0.0-rc.20",
"vitepress-plugin-search": "1.0.4-alpha.20",
"vue": "^3.3.4" "vue": "^3.3.4"
} }
} }

1375
vitepress/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff