Skip to content

Commit dd49375

Browse files
Add docs to this repo
1 parent 4ecd700 commit dd49375

38 files changed

+1110
-0
lines changed

docs/.editorconfig

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
[*]
2+
cpp_indent_braces=false
3+
cpp_indent_multi_line_relative_to=innermost_parenthesis
4+
cpp_indent_within_parentheses=indent
5+
cpp_indent_preserve_within_parentheses=false
6+
cpp_indent_case_labels=false
7+
cpp_indent_case_contents=true
8+
cpp_indent_case_contents_when_block=false
9+
cpp_indent_lambda_braces_when_parameter=true
10+
cpp_indent_goto_labels=one_left
11+
cpp_indent_preprocessor=leftmost_column
12+
cpp_indent_access_specifiers=false
13+
cpp_indent_namespace_contents=true
14+
cpp_indent_preserve_comments=false
15+
cpp_new_line_before_open_brace_namespace=ignore
16+
cpp_new_line_before_open_brace_type=ignore
17+
cpp_new_line_before_open_brace_function=ignore
18+
cpp_new_line_before_open_brace_block=ignore
19+
cpp_new_line_before_open_brace_lambda=ignore
20+
cpp_new_line_scope_braces_on_separate_lines=false
21+
cpp_new_line_close_brace_same_line_empty_type=false
22+
cpp_new_line_close_brace_same_line_empty_function=false
23+
cpp_new_line_before_catch=true
24+
cpp_new_line_before_else=true
25+
cpp_new_line_before_while_in_do_while=false
26+
cpp_space_before_function_open_parenthesis=remove
27+
cpp_space_within_parameter_list_parentheses=false
28+
cpp_space_between_empty_parameter_list_parentheses=false
29+
cpp_space_after_keywords_in_control_flow_statements=true
30+
cpp_space_within_control_flow_statement_parentheses=false
31+
cpp_space_before_lambda_open_parenthesis=false
32+
cpp_space_within_cast_parentheses=false
33+
cpp_space_after_cast_close_parenthesis=false
34+
cpp_space_within_expression_parentheses=false
35+
cpp_space_before_block_open_brace=true
36+
cpp_space_between_empty_braces=false
37+
cpp_space_before_initializer_list_open_brace=false
38+
cpp_space_within_initializer_list_braces=true
39+
cpp_space_preserve_in_initializer_list=true
40+
cpp_space_before_open_square_bracket=false
41+
cpp_space_within_square_brackets=false
42+
cpp_space_before_empty_square_brackets=false
43+
cpp_space_between_empty_square_brackets=false
44+
cpp_space_group_square_brackets=true
45+
cpp_space_within_lambda_brackets=false
46+
cpp_space_between_empty_lambda_brackets=false
47+
cpp_space_before_comma=false
48+
cpp_space_after_comma=true
49+
cpp_space_remove_around_member_operators=true
50+
cpp_space_before_inheritance_colon=true
51+
cpp_space_before_constructor_colon=true
52+
cpp_space_remove_before_semicolon=true
53+
cpp_space_after_semicolon=false
54+
cpp_space_remove_around_unary_operator=true
55+
cpp_space_around_binary_operator=insert
56+
cpp_space_around_assignment_operator=insert
57+
cpp_space_pointer_reference_alignment=left
58+
cpp_space_around_ternary_operator=insert
59+
cpp_wrap_preserve_blocks=one_liners

docs/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Mintlify Starter Kit
2+
3+
Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including
4+
5+
- Guide pages
6+
- Navigation
7+
- Customizations
8+
- API Reference pages
9+
- Use of popular components
10+
11+
### Development
12+
13+
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
14+
15+
```
16+
npm i -g mintlify
17+
```
18+
19+
Run the following command at the root of your documentation (where docs.json is)
20+
21+
```
22+
mintlify dev
23+
```
24+
25+
### Publishing Changes
26+
27+
Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.
28+
29+
#### Troubleshooting
30+
31+
- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
32+
- Page loads as a 404 - Make sure you are running in a folder with `docs.json`

docs/development.mdx

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
title: 'Development'
3+
description: 'Preview changes locally to update your docs'
4+
---
5+
6+
<Info>
7+
**Prerequisite**: Please install Node.js (version 19 or higher) before proceeding. <br />
8+
Please upgrade to ```docs.json``` before proceeding and delete the legacy ```mint.json``` file.
9+
</Info>
10+
11+
Follow these steps to install and run Mintlify on your operating system:
12+
13+
**Step 1**: Install Mintlify:
14+
15+
<CodeGroup>
16+
17+
```bash npm
18+
npm i -g mintlify
19+
```
20+
21+
```bash yarn
22+
yarn global add mintlify
23+
```
24+
25+
</CodeGroup>
26+
27+
**Step 2**: Navigate to the docs directory (where the `docs.json` file is located) and execute the following command:
28+
29+
```bash
30+
mintlify dev
31+
```
32+
33+
A local preview of your documentation will be available at `http://localhost:3000`.
34+
35+
### Custom Ports
36+
37+
By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the `--port` flag. To run Mintlify on port 3333, for instance, use this command:
38+
39+
```bash
40+
mintlify dev --port 3333
41+
```
42+
43+
If you attempt to run Mintlify on a port that's already in use, it will use the next available port:
44+
45+
```md
46+
Port 3000 is already in use. Trying 3001 instead.
47+
```
48+
49+
## Mintlify Versions
50+
51+
Please note that each CLI release is associated with a specific version of Mintlify. If your local website doesn't align with the production version, please update the CLI:
52+
53+
<CodeGroup>
54+
55+
```bash npm
56+
npm i -g mintlify@latest
57+
```
58+
59+
```bash yarn
60+
yarn global upgrade mintlify
61+
```
62+
63+
</CodeGroup>
64+
65+
## Validating Links
66+
67+
The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:
68+
69+
```bash
70+
mintlify broken-links
71+
```
72+
73+
## Deployment
74+
75+
<Tip>
76+
Unlimited editors available under the [Pro
77+
Plan](https://mintlify.com/pricing) and above.
78+
</Tip>
79+
80+
If the deployment is successful, you should see the following:
81+
82+
<Frame>
83+
<img src="/images/checks-passed.png" style={{ borderRadius: '0.5rem' }} />
84+
</Frame>
85+
86+
## Code Formatting
87+
88+
We suggest using extensions on your IDE to recognize and format MDX. If you're a VSCode user, consider the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
89+
90+
## Troubleshooting
91+
92+
<AccordionGroup>
93+
<Accordion title='Error: Could not load the "sharp" module using the darwin-arm64 runtime'>
94+
95+
This may be due to an outdated version of node. Try the following:
96+
1. Remove the currently-installed version of mintlify: `npm remove -g mintlify`
97+
2. Upgrade to Node v19 or higher.
98+
3. Reinstall mintlify: `npm install -g mintlify`
99+
</Accordion>
100+
101+
<Accordion title="Issue: Encountering an unknown error">
102+
103+
Solution: Go to the root of your device and delete the \~/.mintlify folder. Afterwards, run `mintlify dev` again.
104+
</Accordion>
105+
</AccordionGroup>
106+
107+
Curious about what changed in the CLI version? [Check out the CLI changelog.](https://www.npmjs.com/package/mintlify?activeTab=versions)

docs/docs.json

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"$schema": "https://mintlify.com/docs.json",
3+
"theme": "mint",
4+
"name": "Sourcebot",
5+
"colors": {
6+
"primary": "#851EE7",
7+
"light": "#851EE7",
8+
"dark": "#851EE7"
9+
},
10+
"favicon": "/fav.svg",
11+
"styling": {
12+
"eyebrows": "section"
13+
},
14+
"navigation": {
15+
"anchors": [
16+
{
17+
"anchor": "Docs",
18+
"icon": "book-open",
19+
"groups": [
20+
{
21+
"group": "General",
22+
"pages": [
23+
"docs/overview",
24+
"docs/getting-started"
25+
]
26+
},
27+
{
28+
"group": "Connections",
29+
"pages": [
30+
"docs/connections/overview",
31+
"docs/connections/github",
32+
"docs/connections/gitlab"
33+
]
34+
},
35+
{
36+
"group": "Access Tokens",
37+
"pages": [
38+
"docs/access-tokens/overview",
39+
"docs/access-tokens/secrets"
40+
]
41+
}
42+
]
43+
},
44+
{
45+
"anchor": "Self Hosting",
46+
"icon": "server",
47+
"groups": [
48+
{
49+
"group": "Getting Started",
50+
"pages": [
51+
"self-hosting/overview"
52+
]
53+
},
54+
{
55+
"group": "Deployment",
56+
"pages": [
57+
"self-hosting/deployment/source"
58+
]
59+
}
60+
]
61+
}
62+
]
63+
},
64+
"logo": {
65+
"light": "/logo/light.png",
66+
"dark": "/logo/dark.png"
67+
},
68+
"navbar": {
69+
"links": [
70+
{
71+
"label": "Support",
72+
"href": "mailto:team@sourcebot.dev"
73+
}
74+
],
75+
"primary": {
76+
"type": "button",
77+
"label": "Login",
78+
"href": "https://sourcebot.dev/login"
79+
}
80+
},
81+
"footer": {
82+
"socials": {
83+
"github": "https://github.com/sourcebot-dev/sourcebot"
84+
}
85+
},
86+
"integrations": {
87+
"posthog": {
88+
"apiKey": "phc_DBGufjG0rkj3OEhuTcZ04xfeZB6eDhO7dP8ZCnqH7K7"
89+
}
90+
},
91+
"appearance": {
92+
"default": "dark",
93+
"strict": true
94+
}
95+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Access Tokens
3+
sidebarTitle: Access Tokens
4+
---
5+
6+
In order to search your private repos, you'll need to provide Sourcebot with an access token. Access tokens are provided as [secrets](/docs/access-tokens/secrets), which are encrypted at rest and in transit using [AES-256](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard)
7+
8+
<AccordionGroup>
9+
10+
<Accordion title="Create a GitHub Access Token">
11+
Navigate to the [personal access token (PAT) creation page](https://github.com/settings/tokens/new) (or the equivelent page if you're
12+
self hosting)
13+
14+
Ensure that the `repo` scope is enabled. This gives the PAT access to fetch your repos
15+
16+
![GitHub PAT Scope](/images/github_pat_scopes.png)
17+
18+
Once you've created your GitHub PAT, add it as a [secret](access-tokens/secrets) in Sourcebot to use it within your connections
19+
</Accordion>
20+
21+
<Accordion title="Create a GitLab Access Token">
22+
Navigate to the [personal access token (PAT) creation page](https://gitlab.com/-/user_settings/personal_access_tokens) (or the equivelent page if you're
23+
self hosting), and press `Add new token`
24+
25+
Ensure that the `read_api` scope is enabled. This gives the PAT **read-only** access to fetch your repos
26+
27+
![GitLab PAT Scope](/images/gitlab_pat_scopes.png)
28+
29+
Once you've created your GitLab PAT, add it as a [secret](access-tokens/secrets) in Sourcebot to use it within your connections
30+
</Accordion>
31+
</AccordionGroup>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Secrets
3+
subtitle: Secrets
4+
---
5+
6+
Secrets are used to store sensitive data (ex. GitHub/GitLab access tokens), and can be referenced in [Connections](/connections/overview). The main use of secrets is to provide a connection with a personal access token to fetch private repositories.
7+
8+
### Create a secret
9+
10+
To create a secret, navigate to the `Secrets` page within `Settings`. Under `Import a new secret`, select the code host you're importing a secret for and follow the instructions presented.
11+
12+
![Settings Nav](/images/settings_nav.png)
13+
14+
![Secrets Page](/images/secrets_page.png)
15+
16+
### Referencing a secret
17+
18+
After creating a secret, it'll be available to reference within a [connection](/connections/overview). On the connection creation page, **press the secret selection drop down to reference your secret**. This will automatically add the secret reference to the
19+
configuration schema:
20+
21+
![Secret Dropdown](/images/secret_dropdown.png)
22+
![Connection Create Secret](/images/connection_create_secret.png)

0 commit comments

Comments
 (0)