Skip to content

Commit acc0dce

Browse files
committed
initial setup, partners, server tutorial, search
Signed-off-by: Stefan Bischof <[email protected]>
1 parent a50614e commit acc0dce

File tree

261 files changed

+20652
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+20652
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+
concurrency:
19+
group: pages
20+
cancel-in-progress: false
21+
22+
jobs:
23+
# Build job
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
31+
# - uses: pnpm/action-setup@v3 # Uncomment this block if you're using pnpm
32+
# with:
33+
# version: 9 # Not needed if you've set "packageManager" in package.json
34+
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
35+
- name: Setup Node
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 22
39+
cache: npm # or pnpm / yarn
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
- name: Install dependencies
43+
run: npm install # or pnpm install / yarn install / bun install
44+
- name: Build with VitePress
45+
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: docs/.vitepress/dist
50+
51+
# Deployment job
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
needs: build
57+
runs-on: ubuntu-latest
58+
name: Deploy
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

docs/.vitepress/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cache/
2+
dist/

docs/.vitepress/config.mts

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
import { defineConfig } from 'vitepress'
2+
import { withMermaid } from 'vitepress-plugin-mermaid'
3+
import { generateSidebar } from './generateSidebar'
4+
import {
5+
groupIconMdPlugin,
6+
groupIconVitePlugin,
7+
localIconLoader
8+
} from 'vitepress-plugin-group-icons'
9+
import fs from 'fs'
10+
import path from 'path'
11+
12+
// https://vitepress.dev/reference/site-config
13+
export default withMermaid(
14+
15+
defineConfig({
16+
17+
mermaid: {
18+
theme: 'base', // Use base theme to allow CSS variables to take effect
19+
// theme: 'default', // z.B. dark | forest | neutral | base
20+
// startOnLoad: true,
21+
maxTextSize: 250000,
22+
wrap: true
23+
},
24+
25+
title: "Eclipse Daanse",
26+
description: "Data Analysis Services",
27+
base: "/eclipse-daanse.github.io/",
28+
29+
sitemap: {
30+
hostname: 'https://daanse.org',
31+
transformItems(items) {
32+
return items.filter((item) => !item.url.includes('migration'))
33+
}
34+
},
35+
36+
37+
themeConfig: {
38+
search: {
39+
provider: 'local',
40+
options: {
41+
detailedView: true // show details in search
42+
}
43+
},
44+
// https://vitepress.dev/reference/default-theme-config
45+
nav: nav(),
46+
47+
sidebar: {
48+
'/cubeserver/concept': generateSidebar('../cubeserver/concept'),
49+
'/cubeserver/setup': generateSidebar('../cubeserver/setup'),
50+
'/cubeserver/tutorial': generateSidebar('../cubeserver/tutorial','/cubeserver/tutorial'),
51+
'/cubeserver/model': generateSidebar('../cubeserver/model','/cubeserver/model'),
52+
53+
'/board/concept': generateSidebar('../board/concept'),
54+
'/board/setup': generateSidebar('../board/setup'),
55+
'/board/tutorial': generateSidebar('../board/tutorial'),
56+
'/board/model': generateSidebar('../board/model')
57+
58+
},
59+
60+
logo: { src: '/LogoDaanse.svg', width: 24, height: 24 },
61+
62+
socialLinks: [
63+
{ icon: 'github', link: 'https://github.com/eclipse-daanse' }
64+
],
65+
66+
editLink: {
67+
pattern: 'https://github.com/eclipse-daanse/eclipse-daanse.github.io/edit/main/docs/:path',
68+
text: 'Edit this page on GitHub'
69+
},
70+
71+
footer: {
72+
message: 'Released under the Eclipse Public License 2.0',
73+
copyright: 'Copyright © 2025 - Eclipse-Daanse'
74+
}
75+
}
76+
77+
})
78+
)
79+
80+
81+
function nav(): DefaultTheme.NavItem[] {
82+
return [
83+
{
84+
text: 'Partner',
85+
link: '/partner',
86+
activeMatch: '/partner/'
87+
},
88+
{
89+
text: 'Analysis Server',
90+
items: [
91+
{
92+
text: 'Concept',
93+
link: '/cubeserver/concept/index'
94+
},
95+
{
96+
text: 'Setup Guide',
97+
link: '/cubeserver/setup/index'
98+
},
99+
{
100+
text: 'Tutorials - Model',
101+
link: '/cubeserver/tutorial/index'
102+
},
103+
{
104+
text: 'Documentation - Model',
105+
link: '/cubeserver/model/index'
106+
},
107+
]
108+
},
109+
{
110+
text: 'Analysis Dashboard',
111+
items: [
112+
{
113+
text: 'Concept',
114+
link: '/board/concept/index'
115+
},
116+
{
117+
text: 'Setup Guide',
118+
link: '/board/setup/index'
119+
},
120+
{
121+
text: 'Tutorials - Model',
122+
link: '/board/tutorial/index'
123+
},
124+
{
125+
text: 'Documentation - Model',
126+
link: '/board/model/index'
127+
},
128+
]
129+
}
130+
]
131+
}
132+

docs/.vitepress/generateSidebar.ts

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import fs from 'fs'
2+
import path from 'path'
3+
import matter from 'gray-matter'
4+
import { DefaultTheme } from 'vitepress'
5+
6+
interface SidebarEntry {
7+
text: string
8+
link: string
9+
order: number
10+
group: string
11+
}
12+
13+
export function generateSidebar(dir: string, baseUrlPrefix: string): DefaultTheme.SidebarItem[] {
14+
const files = collectMarkdownFiles(path.resolve(__dirname, dir))
15+
const pages: SidebarEntry[] = []
16+
17+
for (const file of files) {
18+
const raw = fs.readFileSync(file, 'utf-8')
19+
const { data } = matter(raw)
20+
21+
// Skip files without required frontmatter
22+
if (!data || !data.title || !data.group) continue
23+
24+
const relPath = file
25+
.replace(path.resolve(__dirname, dir), '')
26+
.replace(/\\/g, '/')
27+
.replace(/\.md$/, '')
28+
.replace(/\/index$/, '') // remove trailing /index
29+
30+
pages.push({
31+
text: data.title,
32+
link: `${baseUrlPrefix}/${relPath}`.replace(/\/+/g, '/'),
33+
order: data.order ?? 999,
34+
group: data.group
35+
})
36+
}
37+
38+
// Group and sort entries
39+
const grouped = new Map<string, SidebarEntry[]>()
40+
for (const page of pages) {
41+
if (!grouped.has(page.group)) grouped.set(page.group, [])
42+
grouped.get(page.group)!.push(page)
43+
}
44+
45+
const sidebar: DefaultTheme.SidebarItem[] = []
46+
47+
for (const [group, items] of grouped.entries()) {
48+
const sortedItems = items
49+
.sort((a, b) => a.order - b.order)
50+
.map(({ text, link }) => ({ text, link }))
51+
52+
sidebar.push({
53+
text: group,
54+
collapsed: false,
55+
items: sortedItems
56+
})
57+
}
58+
59+
return sidebar.sort((a, b) => a.text.localeCompare(b.text))
60+
}
61+
62+
function collectMarkdownFiles(dir: string): string[] {
63+
const entries = fs.readdirSync(dir, { withFileTypes: true })
64+
const files: string[] = []
65+
66+
for (const entry of entries) {
67+
const fullPath = path.join(dir, entry.name)
68+
if (entry.isDirectory()) {
69+
files.push(...collectMarkdownFiles(fullPath))
70+
} else if (entry.isFile() && entry.name.endsWith('.md')) {
71+
files.push(fullPath)
72+
}
73+
}
74+
75+
return files
76+
}
77+

docs/.vitepress/theme/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
export default DefaultTheme
3+
4+
import './styles.css'

docs/.vitepress/theme/styles.css

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
:root:where(:lang(fa)) {
2+
--vp-font-family-base:
3+
'Vazirmatn', 'Inter', ui-sans-serif, system-ui, sans-serif,
4+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
5+
}
6+
7+
:root {
8+
--vp-home-hero-name-color: transparent;
9+
--vp-home-hero-name-background: -webkit-linear-gradient(
10+
120deg,
11+
#E19840 30%,
12+
#4069E1
13+
);
14+
--vp-home-hero-image-background-image: linear-gradient(
15+
-45deg,
16+
#E19840 50%,
17+
#4069E1 50%
18+
);
19+
--vp-home-hero-image-filter: blur(44px);
20+
}
21+
22+
@media (min-width: 640px) {
23+
:root {
24+
--vp-home-hero-image-filter: blur(56px);
25+
}
26+
}
27+
28+
@media (min-width: 960px) {
29+
:root {
30+
--vp-home-hero-image-filter: blur(68px);
31+
}
32+
}
33+
34+
.VPHero .VPImage {
35+
filter: drop-shadow(-2px 4px 6px rgba(0, 0, 0, 0.2));
36+
padding: 18px;
37+
}
38+
39+
/* used in reference/default-theme-search */
40+
img[src='/search.png'] {
41+
width: 100%;
42+
aspect-ratio: 1 / 1;
43+
}
44+
45+
img {
46+
max-height: 60px;
47+
margin-right: 0.5em;
48+
vertical-align: middle;
49+
}
50+
51+
h3 {
52+
display: flex;
53+
align-items: center;
54+
gap: 0.5em;
55+
}
56+
57+
code {
58+
background: #f
59+
}

0 commit comments

Comments
 (0)