Skip to content

Commit 66827d5

Browse files
committed
Initial Update
1 parent 90147f2 commit 66827d5

36 files changed

+1215
-739
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/node_modules
33

44
# Production
5+
.vitepress/.temp
6+
.vitepress/cache
57
/build
68

79
# Generated files
@@ -20,3 +22,8 @@
2022
npm-debug.log*
2123
yarn-debug.log*
2224
yarn-error.log*
25+
26+
# Lock files
27+
package-lock.json
28+
yarn.lock
29+
pnpm-lock.yaml

.vitepress/config.js

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
const baseDir = '/handbook/';
2+
3+
export default {
4+
lang: 'en-GB',
5+
title: 'React Native WebRTC',
6+
description: 'The WebRTC module for React Native',
7+
srcDir: 'src',
8+
outDir: 'build',
9+
base: baseDir,
10+
cleanUrls: 'without-subfolders', // Doesn't seem to function correctly
11+
appearance: 'dark',
12+
head: [
13+
[
14+
'meta',
15+
{
16+
name: 'theme-color',
17+
content: '#3c8772'
18+
}
19+
],
20+
[
21+
'link',
22+
{
23+
rel: 'icon',
24+
href: `${baseDir}logo.svg`,
25+
type: 'image/svg+xml'
26+
}
27+
],
28+
[
29+
'link',
30+
{
31+
rel: 'alternate icon',
32+
href: `${baseDir}favicon.png`,
33+
type: 'image/png',
34+
sizes: '16x16'
35+
}
36+
],
37+
[
38+
'link',
39+
{
40+
rel: 'mask-icon',
41+
href: `${baseDir}logo.svg`,
42+
color: '#ffffff'
43+
}
44+
],
45+
/*
46+
[
47+
'meta',
48+
{
49+
property: 'og:title',
50+
content: ''
51+
}
52+
],
53+
[
54+
'meta',
55+
{
56+
property: 'og:description',
57+
content: ''
58+
}
59+
],
60+
[
61+
'meta',
62+
{
63+
property: 'og:url',
64+
content: ''
65+
}
66+
],
67+
[
68+
'meta',
69+
{
70+
property: 'og:image',
71+
content: ''
72+
}
73+
]
74+
*/
75+
],
76+
markdown: {
77+
theme: {
78+
light: 'vitesse-light',
79+
dark: 'vitesse-dark'
80+
}
81+
},
82+
themeConfig: {
83+
logo: '/logo.svg',
84+
siteTitle: 'React Native WebRTC',
85+
outline: 'deep',
86+
nav: [
87+
{
88+
text: 'Guides',
89+
link: '/guides/intro/getting-started'
90+
},
91+
{
92+
text: 'Examples',
93+
link: '/examples'
94+
},
95+
{
96+
text: 'Ecosystem',
97+
link: '/ecosystem'
98+
},
99+
{
100+
text: 'Community',
101+
link: 'https://react-native-webrtc.discourse.group'
102+
}
103+
],
104+
editLink: {
105+
pattern: 'https://github.com/react-native-webrtc/handbook/edit/master/docs/:path',
106+
text: 'Suggest changes to this page'
107+
},
108+
socialLinks: [
109+
{
110+
icon: 'github',
111+
link: 'https://github.com/react-native-webrtc/react-native-webrtc'
112+
},
113+
{
114+
icon: {
115+
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Discourse</title><path d="M12.103 0C18.666 0 24 5.485 24 11.997c0 6.51-5.33 11.99-11.9 11.99L0 24V11.79C0 5.28 5.532 0 12.103 0zm.116 4.563c-2.593-.003-4.996 1.352-6.337 3.57-1.33 2.208-1.387 4.957-.148 7.22L4.4 19.61l4.794-1.074c2.745 1.225 5.965.676 8.136-1.39 2.17-2.054 2.86-5.228 1.737-7.997-1.135-2.778-3.84-4.59-6.84-4.585h-.008z"/></svg>',
116+
},
117+
link: 'https://react-native-webrtc.discourse.group'
118+
}
119+
],
120+
sidebar: {
121+
'/guides/': [
122+
{
123+
text: 'Introduction',
124+
items: [
125+
{
126+
text: 'What is WebRTC?',
127+
link: '/guides/intro/what-is-webrtc'
128+
},
129+
{
130+
text: 'Supported Features',
131+
link: '/guides/intro/supported-features'
132+
},
133+
{
134+
text: 'Getting Started',
135+
link: '/guides/intro/getting-started'
136+
}
137+
]
138+
},
139+
{
140+
text: 'Extra Steps',
141+
collapsible: true,
142+
items: [
143+
{
144+
text: 'Android 6+',
145+
link: '/guides/extra-steps/android'
146+
},
147+
{
148+
text: 'iOS 12+',
149+
link: '/guides/extra-steps/ios'
150+
},
151+
{
152+
text: 'macOS 10.13+',
153+
link: '/guides/extra-steps/macos'
154+
},
155+
{
156+
text: 'Windows 10+',
157+
link: '/guides/extra-steps/windows'
158+
},
159+
{
160+
text: 'React Native Web',
161+
link: '/guides/extra-steps/react-native-web'
162+
},
163+
{
164+
text: 'Expo 45+',
165+
link: '/guides/extra-steps/expo'
166+
}
167+
]
168+
},
169+
{
170+
text: 'Guides',
171+
collapsible: true,
172+
items: [
173+
{
174+
text: 'Basic Usage',
175+
link: '/guides/basic-usage'
176+
},
177+
{
178+
text: 'Getting a Call Connected',
179+
link: '/guides/getting-a-call-connected'
180+
},
181+
{
182+
text: 'Improving Call Reliability',
183+
link: '/guides/improving-call-reliability'
184+
},
185+
{
186+
text: 'Building WebRTC',
187+
link: '/guides/building-webrtc'
188+
}
189+
]
190+
},
191+
{
192+
text: 'Misc',
193+
collapsible: true,
194+
items: [
195+
{
196+
text: 'Contributing Guidelines',
197+
link: '/guides/misc/contributing'
198+
},
199+
{
200+
text: 'Troubleshooting',
201+
link: '/guides/misc/troubleshooting'
202+
},
203+
{
204+
text: 'FAQs',
205+
link: '/guides/misc/faqs'
206+
}
207+
]
208+
}
209+
]
210+
},
211+
footer: {
212+
message: 'Released under the Apache 2.0 License',
213+
copyright: 'Copyright © 2023 - React Native WebRTC'
214+
}
215+
}
216+
};

.vitepress/theme/index.js

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+
import './styles.css';
3+
4+
export default DefaultTheme;

.vitepress/theme/styles.css

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/**
2+
* Colors
3+
* -------------------------------------------------------------------------- */
4+
5+
:root {
6+
--primary: #ed8a80; /* congo pink */
7+
--primary-content: #3C3C3B; /* charcoal */
8+
--neutral: #27464F; /* midnight green */
9+
--neutral-content: #EDEDED; /* cloud */
10+
--secondary: #EDEDED; /* charcoal */
11+
--secondary-content: #3C3C3B; /* cloud */
12+
--accent: #3C3C3B; /* charcoal */
13+
--accent-content: #EDEDED; /* cloud */
14+
--btn-focus-scale: 1.05;
15+
16+
--vp-c-accent: rgb(218, 180, 11);
17+
18+
/*
19+
--vp-c-brand: var(--primary);
20+
--vp-c-brand-light: #FFA69D;
21+
--vp-c-brand-lighter: #FA978D;
22+
--vp-c-brand-dark: #e47f75;
23+
--vp-c-brand-darker: #db6d62;
24+
*/
25+
26+
--vp-code-block-bg: rgba(125, 125, 125, 0.04);
27+
28+
/*
29+
--vp-c-green-light: rgb(18, 181, 157);
30+
--vp-custom-block-tip-border: rgba(18, 181, 157, 0.5);
31+
--vp-custom-block-tip-bg: rgba(18, 181, 157, 0.1);
32+
--vp-code-line-highlight-color: rgba(18, 181, 157, 0.2);
33+
*/
34+
35+
/* --vp-code-line-highlight-color: #eea74b22; */
36+
/* --vp-code-line-highlight-color: #db6d6232; */
37+
/* --vp-code-line-highlight-color: #db6d6232; */
38+
/* --vp-code-line-highlight-color: rgba(0, 0, 0, 0.1); */
39+
}
40+
41+
.dark {
42+
--vp-c-bg: #121212;
43+
--vp-c-bg-alt: #080808;
44+
45+
--vp-code-block-bg: rgba(0, 0, 0, 0.2);
46+
47+
/*
48+
--vp-code-line-highlight-color: rgba(18, 181, 157, 0.15);
49+
*/
50+
}
51+
52+
/**
53+
* Component: Button
54+
* -------------------------------------------------------------------------- */
55+
56+
:root {
57+
/*
58+
--vp-button-brand-border: var(--vp-c-brand-light);
59+
--vp-button-brand-text: var(--vp-c-text-dark-1);
60+
--vp-button-brand-bg: var(--vp-c-brand);
61+
--vp-button-brand-hover-border: var(--vp-c-brand-light);
62+
--vp-button-brand-hover-text: var(--vp-c-text-dark-1);
63+
--vp-button-brand-hover-bg: var(--vp-c-brand-light);
64+
--vp-button-brand-active-border: var(--vp-c-brand-light);
65+
--vp-button-brand-active-text: var(--vp-c-text-dark-1);
66+
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
67+
*/
68+
}
69+
70+
/**
71+
* Component: Home
72+
* -------------------------------------------------------------------------- */
73+
74+
/* :root {
75+
--vp-home-hero-image-background-image: linear-gradient(-45deg, #42d392 10%, #155f3e 40%);
76+
--vp-home-hero-image-filter: blur(40px);
77+
}
78+
79+
@media (min-width: 640px) {
80+
:root {
81+
--vp-home-hero-image-filter: blur(56px);
82+
}
83+
}
84+
85+
@media (min-width: 960px) {
86+
:root {
87+
--vp-home-hero-image-filter: blur(72px);
88+
}
89+
} */
90+
91+
/**
92+
* Component: Algolia
93+
* -------------------------------------------------------------------------- */
94+
95+
.DocSearch {
96+
--docsearch-primary-color: var(--vp-c-brand) !important;
97+
}
98+
99+
/**
100+
* Custom Navbar
101+
* -------------------------------------------------------------------------- */
102+
103+
104+
.VPNav.no-sidebar {
105+
background: initial !important;
106+
backdrop-filter: initial !important;
107+
}
108+
109+
/*
110+
.dark .VPNavBar.has-sidebar .content {
111+
background: rgba(18, 18, 18, 0.6) !important;
112+
}
113+
*/

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
# The React-Native-WebRTC Handbook
22

3-
This is the React Native WebRTC Handbook.
4-
It's powered by [VitePress](https://vitepress.vuejs.org/).
5-
NOTE: Nodejs >= 16 is necessary.
3+
Powered by [VitePress](https://vitepress.vuejs.org/).
4+
`Nodejs >= 16 is necessary.`
5+
Built automatically with every push thanks to [GH Actions](https://github.com/react-native-webrtc/handbook/blob/master/.github/workflows/gh-pages.yml).
66

7-
## Building the Site
7+
## Want to build and run our handbook locally?
88

9-
The site is built automatically with every push thanks to a [GH Actions](https://github.com/react-native-webrtc/handbook/blob/master/.github/workflows/gh-pages.yml).
10-
If you want to build it locally, follow this simple step:
9+
Say no more. It's as simple as running one of the following lines.
10+
Entirely depends on your preferred package manager.
1111

12-
```js
12+
```
13+
npm install && npm start
1314
yarn && yarn start
15+
pnpm && pnpm start
1416
```
1517

16-
You can now edit the files in the `docs` folder and the site will reflect the changes immediately thanks to live reloading.
18+
You can now edit the files in the `src` folder and the site should start to reflect any changes you make thanks to live reloading.
1719

18-
## Contributing
20+
## Would you like to lend a hand?
1921

20-
We appreciate all contributions to this repository.
21-
Please make a Pull Request, no matter how small, all contributions are valuable!
22+
We appreciate all contributions within our organisation.
23+
Please make a pull request, no matter how small, all contributions are valuable!
24+
Every little helps.

0 commit comments

Comments
 (0)