Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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 .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"type": "shell",
"command": "npm",
"args": ["run", "docs:dev"],
"detail": "vuepress dev content"
"detail": "vitepress dev content"
},
{
"label": "build",
"type": "shell",
"command": "npm",
"args": ["run", "docs:build"],
"detail": "vuepress build content"
"detail": "vitepress build content"
}

]
Expand Down
30 changes: 26 additions & 4 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
// If the subfolder is e.g. 'docs/dist', the env var BASE_DIR should be set to '/docs/dist/'.
//////////////////////////////////////////////////////////////////////////

import { defineConfig } from 'vitepress'
import { defineConfig, withBase } from 'vitepress'
import { head, navbar_EN, navbar_DE, sidebar_EN, sidebar_DE } from './configs'
import path from 'path'
import fs from 'fs'

export default defineConfig({
head: head,
Expand All @@ -20,12 +22,23 @@ export default defineConfig({
lastUpdated: true,
themeConfig: {
siteTitle: '',
externalLinkIcon: true,
// @ts-expect-error
notFoundLight: '/notFound.png',
notFoundDark: '/notFoundDark.png',
socialLinks: [
{ icon: 'github', link: 'https://github.com/hyperion-project/hyperion.ng' },
{ icon: 'discord', link: 'https://discord.com/invite/XtVTb3HEKS' }
{
icon: { svg: fs.readFileSync(path.resolve(__dirname, '../public/icons/svg/github.svg'), 'utf8')},
link: 'https://github.com/hyperion-project'
},
{
icon: { svg: fs.readFileSync(path.resolve(__dirname, '../public/icons/svg/discord.svg'), 'utf8')},
link: 'https://discord.com/invite/XtVTb3HEKS'
},
{
icon: { svg: fs.readFileSync(path.resolve(__dirname, '../public/icons/svg/support.svg'), 'utf8')},
link: 'https://www.paypal.me/HyperionAmbi'
}
],
logo: {
light: '/logo.png',
Expand Down Expand Up @@ -162,5 +175,14 @@ export default defineConfig({
}
}
},
}
},
transformPageData(pageData) {
if (pageData.frontmatter.layout === "home" && Object.keys(pageData.frontmatter.features)?.length) {
pageData.frontmatter.features[0].icon = fs.readFileSync(path.resolve(__dirname, '../public/icons/svg/effects.svg'), 'utf8')
pageData.frontmatter.features[1].icon = fs.readFileSync(path.resolve(__dirname, '../public/icons/svg/json.svg'), 'utf8')
pageData.frontmatter.features[2].icon = fs.readFileSync(path.resolve(__dirname, '../public/icons/svg/forum.svg'), 'utf8')
pageData.frontmatter.features[3].icon = fs.readFileSync(path.resolve(__dirname, '../public/icons/svg/github.svg'), 'utf8')
}
}
})

44 changes: 22 additions & 22 deletions docs/.vitepress/configs/head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,44 @@ export const head: HeadConfig[] = [
['meta', {'http-equiv': 'pragma', content: 'no-cache'}],
['meta', {'http-equiv': 'expires', content: '0'}],

['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: BASE_DIR + 'icons/favicon-16x16.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: BASE_DIR + 'icons/favicon-32x32.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '96x96', href: BASE_DIR + 'icons/favicon-96x96.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '128x128', href: BASE_DIR + 'icons/favicon-128x128.png' }],
['link', { rel: 'icon', type: 'image/ico', href: BASE_DIR + 'icons/favicon.ico' }],
['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: BASE_DIR + 'icons/head/favicon-16x16.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: BASE_DIR + 'icons/head/favicon-32x32.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '96x96', href: BASE_DIR + 'icons/head/favicon-96x96.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '128x128', href: BASE_DIR + 'icons/head/favicon-128x128.png' }],
['link', { rel: 'icon', type: 'image/ico', href: BASE_DIR + 'icons/head/favicon.ico' }],

// iPhone XR
['link', { rel: "apple-touch-startup-image", media: "(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)", href: BASE_DIR + "icons/apple-launch-828x1792.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)', href: BASE_DIR + 'icons/head/apple-launch-828x1792.png' }],
// iPhone X, XS
['link', { rel: "apple-touch-startup-image", media: "(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)", href: BASE_DIR + "icons/apple-launch-1125x2436.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)', href: BASE_DIR + 'icons/head/apple-launch-1125x2436.png' }],
// iPhone XS Max
['link', { rel: "apple-touch-startup-image", media: "(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)", href: BASE_DIR + "icons/apple-launch-1242x2688.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)', href: BASE_DIR + 'icons/head/apple-launch-1242x2688.png' }],
// iPhone 8, 7, 6s, 6
['link', { rel: "apple-touch-startup-image", media: "(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)", href: BASE_DIR + "icons/apple-launch-750x1334.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)', href: BASE_DIR + 'icons/head/apple-launch-750x1334.png' }],
// iPhone 8 Plus, 7 Plus, 6s Plus, 6 Plus
['link', { rel: "apple-touch-startup-image", media: "(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)", href: BASE_DIR + "icons/apple-launch-1242x2208.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)', href: BASE_DIR + 'icons/head/apple-launch-1242x2208.png' }],
// iPhone 5
['link', { rel: "apple-touch-startup-image", media: "(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)", href: BASE_DIR + "icons/apple-launch-640x1136.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)', href: BASE_DIR + 'icons/head/apple-launch-640x1136.png' }],
// iPad Mini, Air, 9.7
['link', { rel: "apple-touch-startup-image", media: "(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)", href: BASE_DIR + "icons/apple-launch-1536x2048.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)', href: BASE_DIR + 'icons/head/apple-launch-1536x2048.png' }],
// iPad Pro 10.5
['link', { rel: "apple-touch-startup-image", media: "(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)", href: BASE_DIR + "icons/apple-launch-1668x2224.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)', href: BASE_DIR + 'icons/head/apple-launch-1668x2224.png' }],
// iPad Pro 11
['link', { rel: "apple-touch-startup-image", media: "(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)", href: BASE_DIR + "icons/apple-launch-1668x2388.png" }],
// iPad Pro 12.9"
['link', { rel: "apple-touch-startup-image", media: "(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)", href: BASE_DIR + "icons/apple-launch-2048x2732.png" }],
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)', href: BASE_DIR + 'icons/head/apple-launch-1668x2388.png' }],
// iPad Pro 12.9'
['link', { rel: 'apple-touch-startup-image', media: '(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)', href: BASE_DIR + 'icons/head/apple-launch-2048x2732.png' }],

// PWA
['link', { rel: 'manifest', href: BASE_DIR + 'manifest.json' }],
['meta', { name: 'theme-color', content: 'white' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
['meta', { name: 'apple-mobile-web-app-title', content: 'Hyperion Documentation' }],
['link', { rel: 'apple-touch-icon', sizes: '120x120', href: BASE_DIR + 'icons/apple-icon-120x120.png' }],
['link', { rel: 'apple-touch-icon', sizes: '152x152', href: BASE_DIR + 'icons/apple-icon-152x152.png' }],
['link', { rel: 'apple-touch-icon', sizes: '167x167', href: BASE_DIR + 'icons/apple-icon-167x167.png' }],
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: BASE_DIR + 'icons/apple-icon-180x180.png' }],
['link', { rel: 'mask-icon', href: BASE_DIR + 'icons/safari-pinned-tab.svg', color: '#fff' }],
['meta', { name: 'msapplication-TileImage', content: BASE_DIR + 'icons/ms-icon-144x144.png' }], // probably invert
['link', { rel: 'apple-touch-icon', sizes: '120x120', href: BASE_DIR + 'icons/head/apple-icon-120x120.png' }],
['link', { rel: 'apple-touch-icon', sizes: '152x152', href: BASE_DIR + 'icons/head/apple-icon-152x152.png' }],
['link', { rel: 'apple-touch-icon', sizes: '167x167', href: BASE_DIR + 'icons/head/apple-icon-167x167.png' }],
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: BASE_DIR + 'icons/head/apple-icon-180x180.png' }],
['link', { rel: 'mask-icon', href: BASE_DIR + 'icons/head/safari-pinned-tab.svg', color: '#fff' }],
['meta', { name: 'msapplication-TileImage', content: BASE_DIR + 'icons/head/ms-icon-144x144.png' }], // probably invert
['meta', { name: 'msapplication-TileColor', content: 'white' }] // might not match with icon
]
28 changes: 9 additions & 19 deletions docs/.vitepress/configs/navbar/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,14 @@ export const navbar_DE: any = [
},
{
text: 'Json API',
items: [
{
text: 'JSON',
items: [
{ text: "JSON-RPC Einführung", link: '/de/json/JSON.md' },
{ text: "Server Informationen", link: '/de/json/ServerInfo.md' },
{ text: "Steuerung", link: '/de/json/Control.md' },
{ text: "Authentifizierung", link: '/de/json/Authentication.md' },
{ text: "Abonnement", link: '/de/json/Subscribe.md' }
]
},
{
text: 'Sonstiges',
items: [
{ text: "Hyperion finden", link: '/de/api/Detect.md' },
{ text: "Leitfaden", link: '/de/api/Guidelines.md' }
]
}
]
link: 'https://api.hyperion-project.org'
},
{
text: "Forum",
link: 'https://hyperion-project.org'
},
{
text: "Changelogs",
link: 'changelogs/index.md'
}
]
31 changes: 10 additions & 21 deletions docs/.vitepress/configs/navbar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,15 @@ export const navbar_EN: any = [
]
},
{
text: "Json API",
items: [
{
text: "JSON",
items: [
{ text: "JSON RPC Introduction", link: '/json/JSON.md' },
{ text: "Server Information", link: '/json/ServerInfo.md' },
{ text: "Control", link: '/json/Control.md' },
{ text: "Authentication", link: '/json/Authentication.md' },
{ text: "Subscription", link: '/json/Subscribe.md' }
]
},
{
text: "Miscellaneous",
items: [
{ text: "Detect Hyperion", link: '/api/Detect.md' },
{ text: "Guidelines", link: '/api/Guidelines.md' }
]
},
]
text: 'Json API',
link: 'https://api.hyperion-project.org'
},
{ text: "Forum", link: 'https://hyperion-project.org' }
{
text: "Forum",
link: 'https://hyperion-project.org'
},
{
text: "Changelogs",
link: 'changelogs/index.md'
}
]
28 changes: 0 additions & 28 deletions docs/.vitepress/configs/sidebar/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,33 +103,5 @@ export const sidebar_DE: any = {
{ text: "Grafische Benutzeroberfläche", link: '/de/api/Ui.md' }
]
}
],
"/de/json/": [
{
text: 'JSON',
items: [
{ text: "JSON-RPC Einführung", link: '/de/json/JSON.md' },
{ text: "Server Informationen", link: '/de/json/ServerInfo.md' },
{ text: "Steuerung", link: '/de/json/Control.md' },
{ text: "Authentifizierung", link: '/de/json/Authentication.md' },
{ text: "Abonnement", link: '/de/json/Subscribe.md' }
]
},
{
text: 'Sonstiges',
items: [
{ text: "Hyperion finden", link: '/de/api/Detect.md' },
{ text: "Leitfaden", link: '/de/api/Guidelines.md' }
]
}
],
"/de/api/": [
{
text: 'Gehe zurück zu',
items: [
{ text: "Effekt-Erstellung", link: '/de/effects/Effects.md' },
{ text: "JSON-RPC Einführung", link: '/de/json/JSON.md' }
]
}
]
}
28 changes: 0 additions & 28 deletions docs/.vitepress/configs/sidebar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,33 +103,5 @@ export const sidebar_EN: any = {
{ text: "Graphical User Interface", link: '/api/Ui.md' }
]
}
],
"/json/": [
{
text: 'JSON',
items: [
{ text: "JSON RPC Introduction", link: '/json/JSON.md' },
{ text: "Server Information", link: '/json/ServerInfo.md' },
{ text: "Control", link: '/json/Control.md' },
{ text: "Authentication", link: '/json/Authentication.md' },
{ text: "Subscription", link: '/json/Subscribe.md' }
]
},
{
text: 'Misc',
items: [
{ text: "Detect Hyperion", link: '/api/Detect.md' },
{ text: "Guidelines", link: '/api/Guidelines.md' }
]
}
],
"/api/": [
{
text: 'Go back to',
items: [
{ text: "Effect development", link: '/effects/Effects.md' },
{ text: "JSON RPC Introduction", link: '/json/JSON.md' }
]
}
]
}
56 changes: 56 additions & 0 deletions docs/.vitepress/theme/components/ChangelogList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<script setup lang="ts">
import MarkdownIt from 'markdown-it'
import { data as changelogs } from '../data/changelogs.data.mts'
import Contributors from './Contributors.vue'

const dateFormatter = new Intl.DateTimeFormat('en', {
dateStyle: 'medium',
})
</script>

<template>
<div
v-for="(release, index) of changelogs"
:key="release.tag_name"
>
<h2 :id="index === 0 ? 'latest' : release.tag_name">
<a
:href="release.html_url"
target="_blank"
>
{{ release.tag_name }}
</a>
<Badge v-if="index === 0" type="tip" text="Latest" />
<a
class="header-anchor"
:href="index === 0 ? '#latest' : `#${release.tag_name}`"
/>
</h2>
<time :datetime="release.published_at!">
{{ dateFormatter.format(new Date(release.published_at!)) }}
</time>
<div v-html="MarkdownIt().render(release.body ?? 'No changelog provided.')" />
<Contributors
:body="release.body!"
:author="release.author.login"
:tag="release.tag_name"
/>
</div>
</template>

<style scoped>
h2 {
margin-bottom: 0;
display: flex;
align-items: center;
gap: 0.5rem;
> a {
color: var(--vp-c-brand-1);
}
}

time {
font-size: 0.875rem;
color: var(--vp-c-text-2);
}
</style>
Loading