Skip to content

Commit e9881ee

Browse files
committed
Initial commit VitePress documentation site
0 parents  commit e9881ee

102 files changed

Lines changed: 15614 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
cache: npm
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Build with VitePress
39+
run: npm run build
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: .vitepress/dist
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
needs: build
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

InterDataEngine-docs/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
.vitepress/dist/
6+
.vitepress/cache/
7+
8+
# Editor directories
9+
.idea/
10+
.vscode/
11+
*.swp
12+
*.swo
13+
*~
14+
15+
# OS files
16+
.DS_Store
17+
Thumbs.db
18+
19+
# Logs
20+
*.log
21+
npm-debug.log*
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
import { defineConfig } from 'vitepress'
2+
import { katex } from '@mdit/plugin-katex'
3+
4+
export default defineConfig({
5+
title: 'InternDataEngine',
6+
base: '/InternDataEngine-Docs/',
7+
8+
themeConfig: {
9+
logo: '/logo.svg',
10+
11+
nav: [
12+
{ text: 'Home', link: '/' },
13+
{ text: 'Getting Started', link: '/guides/installation' },
14+
{ text: 'Core Concepts', link: '/concepts/workflows' },
15+
{ text: 'Policy Validation', link: '/policy/training' }
16+
],
17+
18+
sidebar: [
19+
{
20+
text: 'Getting Started',
21+
items: [
22+
{ text: 'Installation', link: '/guides/installation' },
23+
{ text: 'Quick Start', link: '/guides/quickstart' }
24+
]
25+
},
26+
{
27+
text: 'Core Concepts',
28+
items: [
29+
{ text: 'Workflows', link: '/concepts/workflows' },
30+
{
31+
text: 'Skills',
32+
collapsed: true,
33+
items: [
34+
{ text: 'Overview', link: '/concepts/skills/overview' },
35+
{ text: 'Pick Skill', link: '/concepts/skills/pick' },
36+
{ text: 'Place Skill', link: '/concepts/skills/place' },
37+
{ text: 'Articulation Skill', link: '/concepts/skills/articulation' }
38+
]
39+
},
40+
{ text: 'Objects', link: '/concepts/objects' },
41+
{ text: 'Cameras', link: '/concepts/cameras' },
42+
{ text: 'Robots', link: '/concepts/robots' },
43+
{ text: 'Controllers', link: '/concepts/controllers' }
44+
]
45+
},
46+
{
47+
text: 'Configuration',
48+
items: [
49+
{ text: 'YAML Config', link: '/config/yaml' },
50+
{ text: 'Domain Randomization', link: '/config/dr' },
51+
{ text: 'Assets', link: '/config/assets' }
52+
]
53+
},
54+
{
55+
text: 'Customization',
56+
items: [
57+
{ text: 'New Assets', link: '/custom/assets' },
58+
{ text: 'New Robot', link: '/custom/robot' },
59+
{ text: 'New Controller', link: '/custom/controller' },
60+
{ text: 'New Skill', link: '/custom/skill' },
61+
{ text: 'New Task', link: '/custom/task' }
62+
]
63+
},
64+
{
65+
text: 'Policy Validation',
66+
items: [
67+
{ text: 'Training', link: '/policy/training' }
68+
]
69+
}
70+
],
71+
72+
footer: {
73+
message: 'Released under the MIT License.',
74+
copyright: 'Copyright © 2024 InternDataEngine Team'
75+
},
76+
77+
docFooter: {
78+
prev: 'Previous Page',
79+
next: 'Next Page'
80+
},
81+
82+
outline: {
83+
label: 'On this page',
84+
level: [2, 3]
85+
},
86+
87+
lastUpdated: {
88+
text: 'Last updated',
89+
formatOptions: {
90+
dateStyle: 'medium',
91+
timeStyle: 'short'
92+
}
93+
},
94+
95+
socialLinks: [
96+
{ icon: 'github', link: 'https://github.com/InternRobotics/InternDataEngine' }
97+
],
98+
99+
search: {
100+
provider: 'local'
101+
}
102+
},
103+
104+
markdown: {
105+
lineNumbers: true,
106+
config: (md) => {
107+
md.use(katex)
108+
}
109+
},
110+
111+
head: [
112+
['link', { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css' }]
113+
]
114+
})
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import './style.css'
3+
4+
export default {
5+
...DefaultTheme,
6+
setup() {
7+
// Add drag-to-scroll for code blocks
8+
if (typeof window !== 'undefined') {
9+
setTimeout(() => {
10+
const codeBlocks = document.querySelectorAll('.vp-doc [class*="language-"]')
11+
codeBlocks.forEach(block => {
12+
let isDown = false
13+
let startX
14+
let scrollLeft
15+
16+
block.style.cursor = 'grab'
17+
18+
block.addEventListener('mousedown', (e) => {
19+
isDown = true
20+
block.style.cursor = 'grabbing'
21+
startX = e.pageX - block.offsetLeft
22+
scrollLeft = block.scrollLeft
23+
})
24+
25+
block.addEventListener('mouseleave', () => {
26+
isDown = false
27+
block.style.cursor = 'grab'
28+
})
29+
30+
block.addEventListener('mouseup', () => {
31+
isDown = false
32+
block.style.cursor = 'grab'
33+
})
34+
35+
block.addEventListener('mousemove', (e) => {
36+
if (!isDown) return
37+
e.preventDefault()
38+
const x = e.pageX - block.offsetLeft
39+
const walk = (x - startX) * 1.5
40+
block.scrollLeft = scrollLeft - walk
41+
})
42+
})
43+
44+
// Add click-to-zoom for images
45+
const images = document.querySelectorAll('.vp-doc img')
46+
images.forEach(img => {
47+
img.addEventListener('click', () => {
48+
// Create overlay
49+
const overlay = document.createElement('div')
50+
overlay.className = 'image-zoom-overlay'
51+
52+
// Create zoomed image
53+
const zoomedImg = document.createElement('img')
54+
zoomedImg.src = img.src
55+
56+
overlay.appendChild(zoomedImg)
57+
document.body.appendChild(overlay)
58+
59+
// Close on click
60+
overlay.addEventListener('click', () => {
61+
document.body.removeChild(overlay)
62+
})
63+
64+
// Close on escape key
65+
const handleEsc = (e) => {
66+
if (e.key === 'Escape') {
67+
if (document.body.contains(overlay)) {
68+
document.body.removeChild(overlay)
69+
}
70+
document.removeEventListener('keydown', handleEsc)
71+
}
72+
}
73+
document.addEventListener('keydown', handleEsc)
74+
})
75+
})
76+
}, 500)
77+
}
78+
}
79+
}

0 commit comments

Comments
 (0)