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

@ -5,21 +5,26 @@
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', siteTitle: "EyeTrackVR Docs",
/* Note the footer will not show when sidebar is active */ /* Note the footer will not show when sidebar is active */
search: {
provider: "local",
},
footer: { footer: {
message: "Released under the MIT License.", message: "Released under the MIT License.",
copyright: "Copyright © 2022-present ETVR", copyright: "Copyright © 2022-present ETVR",
}, },
nav: [ nav: [
{ {
text: 'About', text: "About",
items: [ items: [
{ text: 'About Us', link: '/about' }, { text: "About Us", link: "/about" },
{ text: 'Development Road Map', link: '/dev_roadmap' }, { text: "Development Road Map", link: "/dev_roadmap" },
] ],
}, },
{ text: "Contact", link: "/contact" }, { text: "Contact", link: "/contact" },
], ],
@ -29,7 +34,10 @@ const theme = {
collapsible: true, collapsible: true,
items: [ items: [
{ text: "Introduction", link: "/getting_started/intro" }, { text: "Introduction", link: "/getting_started/intro" },
{ text: "Things to know before you start", link: "/getting_started/things_to_know" }, {
text: "Things to know before you start",
link: "/getting_started/things_to_know",
},
{ text: "LED Safety", link: "/getting_started/led_safety" }, { text: "LED Safety", link: "/getting_started/led_safety" },
], ],
}, },
@ -39,7 +47,10 @@ const theme = {
items: [ items: [
{ text: "Full Build Guide", link: "/how_to_build/full_build" }, { text: "Full Build Guide", link: "/how_to_build/full_build" },
{ text: "Part List", link: "/how_to_build/parts_list" }, { 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: "How to Create your own Camera Mount",
link: "/how_to_build/creating_your_own_mount",
},
], ],
}, },
{ {
@ -47,10 +58,22 @@ const theme = {
collapsible: true, collapsible: true,
items: [ items: [
{ text: "Introduction", link: "/firmware_guide/firmware" }, { 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: "Setup Visual Studio Code environment",
{ text: "Uploading and Updating the Firmware", link: "/firmware_guide/upload_and_update_firmware" }, link: "/firmware_guide/setup_vscode",
{ text: "Updating PlatformIO", link: "/firmware_guide/update_platformio" }, },
{
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: "Firmware Environments", link: "/firmware_guide/environments" },
{ text: "MDNS", link: "/firmware_guide/mdns" }, { text: "MDNS", link: "/firmware_guide/mdns" },
{ text: "REST API", link: "/firmware_guide/rest_api" }, { text: "REST API", link: "/firmware_guide/rest_api" },
@ -60,9 +83,18 @@ const theme = {
text: "Software Guide", text: "Software Guide",
collapsible: true, collapsible: true,
items: [ items: [
{ text: "Installing and setting up the ETVR App", link: "/software_guide/eyetrackvr_app_guide" }, {
{ text: "Building the app from source", link: "/software_guide/build_software" }, text: "Installing and setting up the ETVR App",
{ text: "Setting up OSC recenter/recalibrate", link: "/software_guide/osc_setup" }, link: "/software_guide/eyetrackvr_app_guide",
},
{
text: "Building the app from source",
link: "/software_guide/build_software",
},
{
text: "Setting up OSC recenter/recalibrate",
link: "/software_guide/osc_setup",
},
], ],
}, },
{ {
@ -86,15 +118,18 @@ const theme = {
text: "Archive", text: "Archive",
collapsible: true, collapsible: true,
items: [ items: [
{ text: "Prepare to solder IR LED PCB V2's", link: "/archive/fox_ir_v2_build_instructions" }, {
text: "Prepare to solder IR LED PCB V2's",
link: "/archive/fox_ir_v2_build_instructions",
},
], ],
}, },
], ],
socialLinks: [ socialLinks: [
{ icon: 'github', link: 'https://github.com/EyeTrackVR/EyeTrackVR' }, { icon: "github", link: "https://github.com/EyeTrackVR/EyeTrackVR" },
{ icon: 'discord', link: 'https://discord.gg/kkXYbVykZX' } { 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