Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ updates:
schedule:
interval: "weekly"

# Check for Python dependency updates
- package-ecosystem: "pip"
# Check for Node dependency updates
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/ci-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for mkdocs-git-authors-plugin
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
site
/.vscode
.cache
.cache
node_modules
docs/.vitepress/dist
docs/.vitepress/cache
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
FROM squidfunk/mkdocs-material:latest AS build
FROM node:20 AS build

WORKDIR /docs

COPY requirements.txt requirements.txt

RUN pip install -r requirements.txt
COPY package.json package-lock.json ./
RUN npm ci

COPY . .

RUN mkdocs build
RUN npm run docs:build

FROM nginx:1-alpine AS runtime

EXPOSE 80

# Copy release artifacts (static HTML, JS, CSS)
COPY --from=build /docs/site /usr/share/nginx/html
COPY --from=build /docs/docs/.vitepress/dist /usr/share/nginx/html

# Leave startup as-is.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,20 @@
[![Discord](https://img.shields.io/discord/1078124408775901204?style=for-the-badge&color=e14a6d&label=OpenShock%20Discord&logo=discord)](https://openshock.net/discord)

</div></center>

## Development

This documentation site is built with [VitePress](https://vitepress.dev) and includes a local search bar, GitHub links, and automatic contributor sections.

### Local preview

```bash
npm install
npm run docs:dev
```

### Build static site

```bash
npm run docs:build
```
321 changes: 321 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
import { defineConfig } from 'vitepress'
import { execSync } from 'node:child_process'
import { existsSync } from 'node:fs'
import path from 'node:path'

export default defineConfig({
title: 'OpenShock Wiki',
description: 'Documentation for OpenShock',
Comment on lines +6 to +8
Copy link
Preview

Copilot AI Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VitePress configuration is extremely minimal and lacks essential settings that were present in the MkDocs setup. Consider adding base URL, navigation structure, theme configuration, and other settings to maintain feature parity with the previous setup.

Suggested change
export default defineConfig({
title: 'OpenShock Wiki',
description: 'Documentation for OpenShock',
description: 'Documentation for OpenShock',
base: '/openshock-wiki/', // Set base URL if deploying under a subpath
themeConfig: {
nav: [
{ text: 'Home', link: '/' },
{ text: 'Getting Started', link: '/getting-started' },
{ text: 'API Reference', link: '/api/' },
{ text: 'About', link: '/about' }
],
sidebar: {
'/getting-started/': [
{
text: 'Getting Started',
items: [
{ text: 'Introduction', link: '/getting-started/introduction' },
{ text: 'Installation', link: '/getting-started/installation' }
]
}
],
'/api/': [
{
text: 'API Reference',
items: [
{ text: 'Overview', link: '/api/' },
{ text: 'Endpoints', link: '/api/endpoints' }
]
}
]
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/OpenShock' }
]
}

Copilot uses AI. Check for mistakes.

lastUpdated: true,
themeConfig: {
search: { provider: 'local' },
socialLinks: [
{ icon: 'github', link: 'https://github.com/OpenShock/Wiki' },
],
editLink: {
pattern: 'https://github.com/OpenShock/Wiki/edit/main/docs/:path',
text: 'Edit this page on GitHub',
},
nav: [
{
text: 'Home',
items: [
{ text: 'Home', link: '/' },
{ text: 'FAQ', link: '/home/faq' },
{ text: 'Safety', link: '/home/safety-rules' },
],
},
{
text: 'Guides',
items: [
{ text: 'Quickstart', link: '/quickstart/what-you-need' },
{
text: 'OpenShock',
items: [
{ text: 'How to flash your board', link: '/guides/openshock-how-to-flash-your-board' },
{ text: 'First setup', link: '/guides/openshock-first-setup' },
{ text: 'How to update', link: '/guides/openshock-how-to-update' },
{ text: 'Sharelinks', link: '/guides/openshock-sharelinks' },
{ text: 'Sharecodes', link: '/guides/openshock-sharecodes' },
{ text: 'Offline remote setup', link: '/guides/openshock-offline-remote-setup' },
],
},
{
text: 'ShockOsc',
items: [
{ text: 'Basic', link: '/guides/shockosc-basic' },
{ text: 'Avatar setup VRC', link: '/guides/shockosc-avatar-setup-vrc' },
{ text: 'Avatar setup CVR', link: '/guides/shockosc-avatar-setup-cvr' },
{ text: 'Parameters', link: '/guides/shockosc-parameters' },
],
},
{ text: 'Self Hosting', link: '/guides/selfhosting/' },
],
},
{
text: 'Do It Yourself',
items: [
{ text: 'Overview', link: '/diy/' },
{ text: 'Hardware', link: '/diy/hardware-buying' },
{ text: 'Assembling', link: '/diy/assembling' },
],
},
{
text: 'Developer',
items: [
{ text: 'Overview', link: '/dev/' },
{
text: 'Contributing',
items: [
{ text: 'Overview', link: '/dev/contributing/' },
{ text: 'Compile firmware', link: '/dev/contributing/compile-firmware' },
{ text: 'Backend', link: '/dev/contributing/backend' },
],
},
],
},
{
text: 'Hardware',
items: [
{
text: 'Shockers',
items: [
{ text: 'Overview', link: '/hardware/shockers/' },
{ text: 'Caixianlin', link: '/hardware/shockers/caixianlin' },
{ text: 'Petrainer', link: '/hardware/shockers/petrainer' },
],
},
{
text: 'Remotes',
items: [
{ text: 'Identifying', link: '/hardware/remotes/identifying' },
],
},
{
text: 'Boards',
items: [
{ text: 'Overview', link: '/hardware/boards/' },
{ text: 'OpenShock Core v1', link: '/hardware/boards/openshock/core-v1' },
{ text: 'OpenShock Core v2', link: '/hardware/boards/openshock/core-v2' },
{ text: 'PiShock 2023', link: '/hardware/boards/pishock/2023-pishock' },
{ text: 'PiShock Lite 2021Q3', link: '/hardware/boards/pishock/2021q3-lite' },
{ text: 'PiShock Plus 2021Q1', link: '/hardware/boards/pishock/2021q1-plus' },
{ text: 'Seeed XIAO ESP32S3', link: '/hardware/boards/seeed/xiao-esp32s3' },
{ text: 'Wemos D1 mini ESP32', link: '/hardware/boards/wemos/d1-mini-esp32' },
{ text: 'Wemos Lolin S2 mini', link: '/hardware/boards/wemos/lolin-s2-mini' },
{ text: 'Wemos Lolin S3', link: '/hardware/boards/wemos/lolin-s3' },
{ text: 'DFRobot Firebeetle', link: '/hardware/boards/dfr-firebeetle/dfr-firebeetle' },
{ text: 'ESP32-S3 DORx', link: '/hardware/boards/china/esp32s3-dorx' },
],
},
{
text: 'Transmitter',
items: [
{ text: 'Overview', link: '/hardware/transmitter/' },
{ text: 'Open Smart', link: '/hardware/transmitter/china/open-smart' },
],
},
],
},
{
text: 'Vendors',
items: [
{
text: 'Hardware',
items: [
{ text: 'Overview', link: '/vendors/hardware/' },
{ text: '0x6f78', link: '/vendors/hardware/0x6f78' },
{ text: 'Bosjesman', link: '/vendors/hardware/bosjesman' },
{ text: 'Luc', link: '/vendors/hardware/luc' },
{ text: 'NamelessNanashi', link: '/vendors/hardware/namelessnanashi' },
{ text: 'Nerex', link: '/vendors/hardware/nerex' },
{ text: 'Nullstalgia', link: '/vendors/hardware/nullstalgia' },
{ text: 'SillyPupKit', link: '/vendors/hardware/sillypupkit' },
],
},
],
},
{
text: 'Troubleshooting',
items: [
{ text: 'Hub', link: '/troubleshooting/hub' },
{ text: 'ShockOsc', link: '/troubleshooting/shockosc' },
{ text: 'Shocker pairing', link: '/troubleshooting/shocker-pairing' },
],
},
{
text: 'Legal and Privacy',
items: [
{ text: 'Terms and Conditions', link: '/legal/terms-and-conditions' },
{ text: 'Code of Conduct', link: '/legal/code-of-conduct' },
{ text: 'License', link: '/legal/license' },
],
},
],
sidebar: {
'/': [
{
text: 'Home',
items: [
{ text: 'Home', link: '/' },
{ text: 'FAQ', link: '/home/faq' },
{ text: 'Safety', link: '/home/safety-rules' },
],
},
],
'/quickstart/': [
{
text: 'Quickstart',
items: [
{ text: 'What you need', link: '/quickstart/what-you-need' },
],
},
],
'/guides/': [
{
text: 'OpenShock',
items: [
{ text: 'How to flash your board', link: '/guides/openshock-how-to-flash-your-board' },
{ text: 'First setup', link: '/guides/openshock-first-setup' },
{ text: 'How to update', link: '/guides/openshock-how-to-update' },
{ text: 'Sharelinks', link: '/guides/openshock-sharelinks' },
{ text: 'Sharecodes', link: '/guides/openshock-sharecodes' },
{ text: 'Offline remote setup', link: '/guides/openshock-offline-remote-setup' },
],
},
{
text: 'ShockOsc',
items: [
{ text: 'Basic', link: '/guides/shockosc-basic' },
{ text: 'Avatar setup VRC', link: '/guides/shockosc-avatar-setup-vrc' },
{ text: 'Avatar setup CVR', link: '/guides/shockosc-avatar-setup-cvr' },
{ text: 'Parameters', link: '/guides/shockosc-parameters' },
],
},
{
text: 'Self Hosting',
items: [
{ text: 'Overview', link: '/guides/selfhosting/' },
],
},
],
'/diy/': [
{
text: 'Do It Yourself',
items: [
{ text: 'Overview', link: '/diy/' },
{ text: 'Hardware', link: '/diy/hardware-buying' },
{ text: 'Assembling', link: '/diy/assembling' },
],
},
],
'/dev/': [
{
text: 'Developer',
items: [
{ text: 'Overview', link: '/dev/' },
{ text: 'Contributing', link: '/dev/contributing/' },
{ text: 'Compile firmware', link: '/dev/contributing/compile-firmware' },
{ text: 'Backend', link: '/dev/contributing/backend' },
],
},
],
'/hardware/': [
{
text: 'Shockers',
items: [
{ text: 'Overview', link: '/hardware/shockers/' },
{ text: 'Caixianlin', link: '/hardware/shockers/caixianlin' },
{ text: 'Petrainer', link: '/hardware/shockers/petrainer' },
],
},
{
text: 'Remotes',
items: [
{ text: 'Identifying', link: '/hardware/remotes/identifying' },
],
},
{
text: 'Boards',
items: [
{ text: 'Overview', link: '/hardware/boards/' },
{ text: 'OpenShock Core v1', link: '/hardware/boards/openshock/core-v1' },
{ text: 'OpenShock Core v2', link: '/hardware/boards/openshock/core-v2' },
{ text: 'PiShock 2023', link: '/hardware/boards/pishock/2023-pishock' },
{ text: 'PiShock Lite 2021Q3', link: '/hardware/boards/pishock/2021q3-lite' },
{ text: 'PiShock Plus 2021Q1', link: '/hardware/boards/pishock/2021q1-plus' },
{ text: 'Seeed XIAO ESP32S3', link: '/hardware/boards/seeed/xiao-esp32s3' },
{ text: 'Wemos D1 mini ESP32', link: '/hardware/boards/wemos/d1-mini-esp32' },
{ text: 'Wemos Lolin S2 mini', link: '/hardware/boards/wemos/lolin-s2-mini' },
{ text: 'Wemos Lolin S3', link: '/hardware/boards/wemos/lolin-s3' },
{ text: 'DFRobot Firebeetle', link: '/hardware/boards/dfr-firebeetle/dfr-firebeetle' },
{ text: 'ESP32-S3 DORx', link: '/hardware/boards/china/esp32s3-dorx' },
],
},
{
text: 'Transmitter',
items: [
{ text: 'Overview', link: '/hardware/transmitter/' },
{ text: 'Open Smart', link: '/hardware/transmitter/china/open-smart' },
],
},
],
'/vendors/': [
{
text: 'Hardware',
items: [
{ text: 'Overview', link: '/vendors/hardware/' },
{ text: '0x6f78', link: '/vendors/hardware/0x6f78' },
{ text: 'Bosjesman', link: '/vendors/hardware/bosjesman' },
{ text: 'Luc', link: '/vendors/hardware/luc' },
{ text: 'NamelessNanashi', link: '/vendors/hardware/namelessnanashi' },
{ text: 'Nerex', link: '/vendors/hardware/nerex' },
{ text: 'Nullstalgia', link: '/vendors/hardware/nullstalgia' },
{ text: 'SillyPupKit', link: '/vendors/hardware/sillypupkit' },
],
},
],
'/troubleshooting/': [
{
text: 'Troubleshooting',
items: [
{ text: 'Hub', link: '/troubleshooting/hub' },
{ text: 'ShockOsc', link: '/troubleshooting/shockosc' },
{ text: 'Shocker pairing', link: '/troubleshooting/shocker-pairing' },
],
},
],
'/legal/': [
{
text: 'Legal and Privacy',
items: [
{ text: 'Terms and Conditions', link: '/legal/terms-and-conditions' },
{ text: 'Code of Conduct', link: '/legal/code-of-conduct' },
{ text: 'License', link: '/legal/license' },
],
},
],
},
},
async transformHtml(code, _id, ctx) {
const file = path.join(process.cwd(), 'docs', ctx.pageData.relativePath)
if (existsSync(file)) {
try {
const out = execSync(`git --no-pager shortlog -sne HEAD -- "${file}"`, { encoding: 'utf-8' })
const contributors = out
.split('\n')
.filter(Boolean)
.map((line) => line.replace(/^\s*\d+\s+/, '').replace(/\s+<.*>/, ''))
if (contributors.length) {
const escape = (s: string) => s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
const items = contributors.map((name) => `<li>${escape(name)}</li>`).join('')
return code.replace('</div></div></main>', `<div class="contributors"><h2>Contributors</h2><ul>${items}</ul></div></div></div></main>`)
}
} catch {
// ignore git errors
}
}
return code
},
})

Loading