-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: updated installation instructions and began organizing the headers for the doc site #56
Changes from 1 commit
eec7862
2faa034
bbed326
ee45174
f2fce90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,117 @@ | |
sidebar_position: 1 | ||
--- | ||
|
||
# Tutorial Intro | ||
# Installation | ||
|
||
To integrate React Native MediaPipe into your project, follow these simple steps. | ||
|
||
### Requirements | ||
- Gradle minimum SDK 24 or higher | ||
- Android-SDK Version 26 or higher | ||
- iOS 12 or higher | ||
|
||
1. **Open Terminal or Command Prompt:** Open your terminal or command prompt application. | ||
2. **Navigate to Your Project Directory:** Navigate to your React Native project directory. | ||
3. **Install React Native MediaPipe:** Run the following command to install React Native MediaPipe and its dependencies: | ||
|
||
#### Using npm | ||
```bash | ||
npm install react-native-mediapipe react-native-vision-camera react-native-worklets-core | ||
``` | ||
|
||
#### Using yarn | ||
|
||
```bash | ||
yarn install react-native-mediapipe react-native-vision-camera react-native-worklets-core | ||
``` | ||
4. **Configuring Babel:** Navigate to the 'babel.config.js' file and add: | ||
|
||
```bash | ||
module.exports = { | ||
presets: ['module:@react-native/babel-preset'], | ||
plugins: [['react-native-workless-core/plugin']], | ||
}; | ||
``` | ||
5. **Configuring Gradle:** Navigate to the 'gradle/build.gradle' file and change minSdkVersion to 24 | ||
|
||
:::warning | ||
|
||
**Gradle minimum SDK** must be 24 or higher to run | ||
|
||
::: | ||
|
||
```bash | ||
buildscript { | ||
ext { | ||
... | ||
minSdkVersion = 24 | ||
... | ||
} | ||
... | ||
} | ||
|
||
``` | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
### Configuring to your Operating System | ||
|
||
<Tabs groupId="operating-systems"> | ||
<TabItem value="win" label="Windows"> | ||
<p> | ||
1. **Give Permissions:** Navigate to your AndroidManifest.xml file and add: | ||
</p> | ||
<pre> | ||
<code> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
|
||
<!-- optionally, if you want to record audio: --> | ||
|
||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
</code> | ||
</pre> | ||
</TabItem> | ||
<TabItem value="mac" label="macOS"> | ||
<p> | ||
1. **Give Permissions:** Navigate to your info.plist file in the outermost tag: | ||
</p> | ||
<pre> | ||
<code> | ||
<key>NSCameraUsageDescription</key> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to hand-encode those, just put the triple ticks before and after, like you do with other code types |
||
<string>$(PRODUCT_NAME) needs access to your Camera.</string> | ||
|
||
<!-- optionally, if you want to record audio: --> | ||
|
||
<key>NSMicrophoneUsageDescription</key> | ||
<string>$(PRODUCT_NAME) needs access to your Microphone.</string> | ||
</code> | ||
</pre> | ||
<p> | ||
2. **Terminal Commands:** In your terminal run the following commands | ||
</p> | ||
<pre> | ||
<code> | ||
cd ios | ||
bundle install | ||
pod install | ||
</code> | ||
</pre> | ||
:::info | ||
|
||
You will only need to run the **bundle install** command once. | ||
|
||
::: | ||
</TabItem> | ||
</Tabs> | ||
|
||
|
||
|
||
<!-- --- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Introduction | ||
|
||
Let's discover **Docusaurus in less than 5 minutes**. | ||
|
||
|
@@ -44,4 +154,4 @@ The `cd` command changes the directory you're working with. In order to work wit | |
|
||
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. | ||
|
||
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. | ||
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"label": "Tutorial - Basics", | ||
"label": "API", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "5 minutes to learn the most important Docusaurus concepts." | ||
"description": "This API reference documentation provides detailed information for each of the classifiers in the react native media-pipe library." | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ const config: Config = { | |
// Remove this to remove the "edit this page" links. | ||
// editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', | ||
}, | ||
|
||
theme: { | ||
customCss: './src/css/custom.css', | ||
}, | ||
|
@@ -50,7 +51,7 @@ const config: Config = { | |
// Replace with your project's social card | ||
image: 'img/docusaurus-social-card.jpg', | ||
navbar: { | ||
title: 'My Site', | ||
title: 'React Native MediaPipe', | ||
logo: { | ||
alt: 'My Site Logo', | ||
src: 'img/logo.svg', | ||
|
@@ -60,7 +61,12 @@ const config: Config = { | |
type: 'docSidebar', | ||
sidebarId: 'tutorialSidebar', | ||
position: 'left', | ||
label: 'Tutorial', | ||
label: 'Docs', | ||
}, | ||
{ | ||
href: 'https://discord.gg/6E7BdHEJ', | ||
label: 'Community', | ||
position: 'left', | ||
}, | ||
{ | ||
href: 'https://www.loom.com/share/248e835862c7446abacd8812210ae361?sid=67615359-f063-48af-9d39-77016946c3ed', | ||
|
@@ -86,6 +92,15 @@ const config: Config = { | |
}, | ||
], | ||
}, | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this adds another footer section titled Community with a single broken link to a page that doesn't exist. What are you trying to achieve with this? |
||
title: 'Community', | ||
items: [ | ||
{ | ||
label: 'Tutorial', | ||
to: '/docs/community', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Community', | ||
items: [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that this link doesn't actually work (because I didn't realize I needed a particular invite link) - just remove this and the section ? Or fix the link in here to be the same as in the header ? Or not add the one in the header at all and only here ? Also, any additional items we want to throw under the title "Community" we should put in the items collection, and not add any other sections titled Community, that's just confusing. Typically, you'd put discord/twitter/whatever else you got here. Also, this will FAIL building the documentation site because the build realizes it's a broken link. Run "yarn build" and observe this failure: [ERROR] Error: Unable to build website for locale en. Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist. It looks like some of the broken links we found appear in many pages of your site.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm trying to make the changes for the community link and had a couple of questions. I have removed the extra community from the footer and inserted a invite link to the community that was there before. If someone were to click on it, it takes them to our discord but it says that I am personally inviting them so it shows my name and user. Not sure if there is a better link we should be using. Also, you mentioned not having the community in the header at all or making sure both communities (from header and footer) are the same. Which would you suggest is the better option? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know that my opinion here is totally relevant, but if you put yourself in the shoes of a person coming to read this page - would you expect to have two links to the same spot, or would that confuse you ? I think a person looking for a Discord link should find it. No idea about your first question, with making the invite link not personal to you. Looks like this one works (may require a paid account though ?): https://support.discord.com/hc/en-us/articles/115001542132-Custom-Invite-Link There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the community from the nav bar and decided to just keep the one in the footer. I also changed the link for the discord to never expire. |
||
|
@@ -114,4 +129,4 @@ const config: Config = { | |
} satisfies Preset.ThemeConfig, | ||
}; | ||
|
||
export default config; | ||
export default config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worklets not workless.