Skip to content

Commit 0fd035a

Browse files
author
Stasonych
committed
actualized branch
1 parent 9da2dc5 commit 0fd035a

77 files changed

Lines changed: 3043 additions & 844 deletions

Some content is hidden

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

.github/funding.yml

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

.github/workflows/pages.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy Documentation to Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v5
26+
27+
- name: Setup Node
28+
uses: actions/setup-node@v5
29+
with:
30+
node-version: 22
31+
cache: npm
32+
cache-dependency-path: docs/package-lock.json
33+
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v5
36+
37+
- name: Install dependencies
38+
run: |
39+
cd docs
40+
npm ci
41+
42+
- name: Build with VitePress
43+
run: |
44+
cd docs
45+
npm run build
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v4
49+
with:
50+
path: docs/.vitepress/dist
51+
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

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ jobs:
105105
RELEASE_VERSION=$(grep "project.rel.dev.onvoid.webrtc\\\:webrtc-java=" release.properties | cut -d'=' -f2)
106106
echo "Extracted release version from release.properties: $RELEASE_VERSION"
107107
108-
# Update versions.js file
109-
echo "Updating versions.js with release version: $RELEASE_VERSION and development version: ${{ github.event.inputs.developmentVersion }}"
110-
sed -i "s/VERSION: '.*'/VERSION: '$RELEASE_VERSION'/g" docs/assets/versions.js
111-
sed -i "s/VERSION_SNAPSHOT: '.*'/VERSION_SNAPSHOT: '${{ github.event.inputs.developmentVersion }}'/g" docs/assets/versions.js
108+
# Update versions.ts file
109+
echo "Updating versions.ts with release version: $RELEASE_VERSION and development version: ${{ github.event.inputs.developmentVersion }}"
110+
sed -i "s/VERSION: '.*'/VERSION: '$RELEASE_VERSION'/g" docs/.vitepress/versions.ts
111+
sed -i "s/VERSION_SNAPSHOT: '.*'/VERSION_SNAPSHOT: '${{ github.event.inputs.developmentVersion }}'/g" docs/.vitepress/versions.ts
112112
113113
# Add the updated file to the existing commit
114-
git add docs/assets/versions.js
114+
git add docs/.vitepress/versions.ts
115115
git commit --amend --no-edit
116116
117117
git push

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Maven Central](https://img.shields.io/maven-central/v/dev.onvoid.webrtc/webrtc-java?label=Maven%20Central&logo=apache-maven)](https://search.maven.org/artifact/dev.onvoid.webrtc/webrtc-java)
33

44
<p align="center">
5-
<img alt="webrtc-java" width="100px" src="https://jrtc.dev/assets/images/logo.png" />
5+
<img alt="webrtc-java" width="100px" src="https://jrtc.dev/logo.png" />
66
<h2 align="center">Connecting the Java world through WebRTC</h2>
77
</p>
88

@@ -25,10 +25,10 @@ The library provides a comprehensive set of Java classes that map to the WebRTC
2525

2626
For more detailed information, check out the documentation:
2727

28-
- [Quickstart](https://jrtc.dev/#/quickstart) - Get up and running quickly with webrtc-java
29-
- [Guides](https://jrtc.dev/#/guide/overview) - Comprehensive documentation on using the library
30-
- [Examples](https://jrtc.dev/#/examples) - Sample code demonstrating various features
31-
- [Build Notes](https://jrtc.dev/#/build) - Instructions for building the library from source
28+
- [Quickstart](https://jrtc.dev/guide/get-started) - Get up and running quickly with webrtc-java
29+
- [Guides](https://jrtc.dev/guide/) - Comprehensive documentation on using the library
30+
- [Examples](https://jrtc.dev/guide/examples) - Sample code demonstrating various features
31+
- [Build Notes](https://jrtc.dev/guide/build) - Instructions for building the library from source
3232

3333
## License
3434

docs/.gitignore

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

docs/.nojekyll

Whitespace-only changes.

docs/.vitepress/config.mts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { defineConfig } from 'vitepress'
2+
import { footer } from "./footer";
3+
import { head } from "./head";
4+
import { navbar } from "./nav";
5+
import { sidebar } from "./sidebar";
6+
import { PROJECT_VARS } from './versions'
7+
8+
export default defineConfig({
9+
title: "webrtc-java",
10+
description: "Java native interface for WebRTC",
11+
cleanUrls: true,
12+
13+
head: head,
14+
15+
themeConfig: {
16+
logo: {
17+
light: '/logo.png',
18+
dark: '/logo.png',
19+
alt: 'logo'
20+
},
21+
22+
externalLinkIcon: true,
23+
24+
nav: navbar,
25+
sidebar: sidebar,
26+
footer: footer,
27+
socialLinks: [
28+
{ icon: 'github', link: 'https://github.com/devopvoid/webrtc-java' },
29+
],
30+
search: {
31+
provider: 'local',
32+
},
33+
},
34+
35+
markdown: {
36+
config: (md) => {
37+
md.use(variableInterpolationPlugin)
38+
},
39+
},
40+
})
41+
42+
function variableInterpolationPlugin(md) {
43+
md.core.ruler.after('normalize', 'variable-interpolation', (state) => {
44+
Object.entries(PROJECT_VARS).forEach(([key, value]) => {
45+
const regex = new RegExp(`{{\\s*${key}\\s*}}`, 'g')
46+
state.src = state.src.replace(regex, value)
47+
})
48+
})
49+
}

docs/.vitepress/footer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { DefaultTheme } from "vitepress";
2+
3+
export const footer: DefaultTheme.Footer = {
4+
message: 'Released under the <a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache-2.0 License</a>.',
5+
copyright: 'Copyright © 2019-present <a href="https://github.com/devopvoid" target="_blank">Alex Andres</a>',
6+
}

docs/.vitepress/head.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { HeadConfig } from "vitepress/types/shared";
2+
3+
const isProd = process.env.NODE_ENV === 'production';
4+
5+
const head: HeadConfig[] = [
6+
['link', { rel: "icon", type: "image/png", sizes: "96x96", href: "/favicon-96x96.png" }],
7+
['link', { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }],
8+
['link', { rel: "shortcut icon", href: "/favicon.ico" }],
9+
['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" }],
10+
['link', { rel: "manifest", href: "/site.webmanifest" }],
11+
['meta', { name: "apple-mobile-web-app-title", content: "JRTC" }],
12+
]
13+
14+
if (isProd) {
15+
head.push([
16+
'script',
17+
{
18+
async: '',
19+
src: 'https://eu.umami.is/script.js',
20+
'data-website-id': '126654a9-5f07-4b57-ad7e-023eda3980ff',
21+
'data-domains': 'jrtc.dev',
22+
'data-do-not-track': 'true'
23+
},
24+
])
25+
}
26+
27+
export { head }

docs/.vitepress/nav.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { DefaultTheme } from "vitepress";
2+
import { PROJECT_VARS } from './versions'
3+
4+
export const navbar: DefaultTheme.NavItem[] = [
5+
{
6+
text: 'Guide',
7+
link: '/guide/',
8+
},
9+
{
10+
text: 'Examples',
11+
link: '/guide/examples',
12+
},
13+
{
14+
text: 'Tools',
15+
link: '/tools',
16+
},
17+
{
18+
text: PROJECT_VARS.VERSION,
19+
items: [
20+
{
21+
text: 'Changelog',
22+
link: 'https://github.com/devopvoid/webrtc-java/blob/main/CHANGELOG.md'
23+
},
24+
{
25+
text: 'Build Notes',
26+
link: '/guide/build'
27+
}
28+
]
29+
}
30+
]

0 commit comments

Comments
 (0)