Skip to content

Commit 1a600d1

Browse files
authored
Update 2-importing.md
1 parent e66555d commit 1a600d1

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

packages/homepage/content/docs/2-importing.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,35 @@ and begin creating your own sandbox.
1919

2020
## Import from GitHub
2121

22-
You can import a GitHub repository in to CodeSandbox from the
22+
You can import a GitHub repository in to CodeSandbox using our
2323
[import wizard](https://codesandbox.io/s/github) and pasting the URL to your
24-
GitHub repository. Note that we just take the last part of the url (everything
25-
after github.com) and append it after codesandbox.io/s/github/. We support
26-
custom branches and subdirectories. Here is an example URL:
27-
[https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/todomvc](https://codesandbox.io/s/github/reactjs/redux/tree/master/examples/todomvc).
24+
GitHub repository. We support custom branches and subdirectories.
2825

2926
The imported repository will always stay up to date with your latest commits.
3027
This means that any change to the GitHub repository will be reflected
31-
immediately to the sandbox.
28+
immediately in the sandbox.
3229

33-
### Setting inference
30+
### Using GitHubBox.com
31+
An easy way to import a repo to CodeSandbox via URL is with GitHubBox.com. Append
32+
'box' to your github.com URL in between 'hub' and '.com' and it will redirect to
33+
CodeSandbox.
34+
35+
Here's an example:
36+
37+
Change the GitHub URL:
38+
[https://github.com/reduxjs/redux/tree/master/examples/todomvc](https://github.com/reduxjs/redux/tree/master/examples/todomvc).
39+
40+
To:
41+
[https://githubbox.com/reactjs/redux/tree/master/examples/todomvc](https://githubbox.com/reactjs/redux/tree/master/examples/todomvc).
42+
43+
The result is we take the last part of the url (everything after github.com) and
44+
use it in our importer at codesandbox.io/s/github/, adding the repo to CodeSandbox.
3445

35-
We infer sandbox settings based on several files in a repository.
46+
### Using a Browser Extension
47+
We have browswer extensions for [Chrome](https://chrome.google.com/webstore/detail/open-in-codesandbox/hdidglkcgdolpoijdckmafdnddjoglia) and [Firefox](https://addons.mozilla.org/en-GB/firefox/addon/codesandbox/), which add an 'Open in CodeSandbox' button to GitHub repo pages. This makes it easy to import existing projects from GitHub in to CodeSandbox.
48+
49+
### Setting inference
50+
When importting, we infer sandbox settings based on several files in a repository.
3651

3752
| Sandbox Setting | Inferred from |
3853
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -41,7 +56,7 @@ We infer sandbox settings based on several files in a repository.
4156
| Tags | `keywords` field in `package.json` |
4257
| Template | Based on [this](https://github.com/codesandbox-app/codesandbox-importers/blob/master/packages/import-utils/src/create-sandbox/templates.ts#L63) logic |
4358

44-
Additionally, you may specify a `template` property in your
59+
If the correct template isn't automatically being used when importing, then you may specify a `template` property in your
4560
`./sandbox.config.json` file to override the detected template.
4661

4762
```json
@@ -50,11 +65,6 @@ Additionally, you may specify a `template` property in your
5065
}
5166
```
5267

53-
### Source
54-
55-
You can find the source of our git extractor
56-
[here](https://github.com/codesandbox-app/git-extractor).
57-
5868
## Import Local projects via CLI
5969

6070
You can import a local project in to CodeSandbox by using our

0 commit comments

Comments
 (0)