You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-15Lines changed: 50 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ Devbox is recommended for users who prefer a quick setup with isolated environme
34
34
35
35
```bash
36
36
devbox shell
37
+
37
38
task serve
38
39
```
39
40
@@ -44,7 +45,9 @@ Alternatively, in VS Code, you can run the `Start the Docs web server` task, whi
44
45
45
46
### Using a Dev Container
46
47
47
-
For those seeking greater isolation and portability, the Dev Container method is ideal. Here are the steps to use Dev Container in VS Code:
48
+
For those seeking greater isolation and portability, the Dev Container method is a better choice. It provides a consistent environment foreveryone who uses it, ensuring that the documentation is built and servedin the same way across different machines. The Dev Container in this repository is configured to use the Devbox inside, so you can use either method to run the docs web server.
49
+
50
+
Here are the steps to use Dev Container in VS Code:
48
51
49
52
1. Install [Docker Engine](https://docs.docker.com/engine/install/) if you don't already have it installed.
50
53
2. Install the **Dev Containers** extension in VS Code.
@@ -58,48 +61,78 @@ For those seeking greater isolation and portability, the Dev Container method is
58
61
task serve
59
62
```
60
63
61
-
If the repository was cloned using SSH instead of HTTPS, to work with the remote repository from the Dev Container, you need to make sure that your SSH key is added to your local SSH agent. You can follow the instructions [here](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials#_using-ssh-keys) on how to do it. In most cases, executing `ssh-add $HOME/.ssh/path_to_your_ssh_private_key` should be sufficient.
64
+
In addition, the Dev Container in this repository is configured to install necessary VS Code extensions automatically. Here are the extensions that will be installed:
65
+
66
+
- [devbox by jetpack.io](https://marketplace.visualstudio.com/items?itemName=jetpack-io.devbox)
67
+
- [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
- [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) with enabled Markdown support. This extension is optional but highly recommended for long-term use. It requires an active GitHub Copilot subscription.
72
+
- [GitHub Copilot Chat](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat). This extension is also optional but highly recommended for long-term use. It also requires an active GitHub Copilot subscription.
73
+
74
+
> **Note:**
75
+
> If the repository was cloned using SSH instead of HTTPS, to work with the remote repository from the Dev Container, you need to make sure that your SSH key is added to your local SSH agent. You can follow the instructions [here](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials#_using-ssh-keys) on how to do it. In most cases, executing `ssh-add $HOME/.ssh/path_to_your_ssh_private_key` should be sufficient.
62
76
63
77
### Developing on Local Machine
64
78
65
79
MkDocs will incrementally rebuild the site with each file change. Keep your browser open to [http://localhost:8000/](http://localhost:8000/) and refresh to view updates. Use CTRL+C in the terminal to stop the server.
66
80
67
81
## Developing In The Cloud
68
82
69
-
When it comes to editing Git-based documentation in the cloud, there are multiple solutions to choose from. For minor changes in a single file, the GitHub interface can be suitable. However, for more extensive modifications, you might prefer a more comprehensive development environment. Some popular alternatives include GitHub Codespaces, github.dev, and Devbox Cloud.
70
-
71
-
The github.dev is a lightweight web-based editor that offers a quick and convenient way to contribute without the need to start a web server and preview the entire end result.
72
-
73
-
GitHub Codespaces provides a comprehensive development environment in the cloud, allowing you to easily edit and preview the documentation. It offers a full-featured development environment with a terminal, code editor, and integrated Git support.
74
-
75
-
Devbox Cloud is a fast alternative to GitHub Codespaces, allowing you to instantly preview changes in the documentation without setting up a local development environment.
83
+
When it comes to editing Git-based documentation in the cloud, there are multiple solutions to choose from. For minor changes in a single file, the GitHub interface can be suitable. However, for more extensive modifications, you might prefer a more comprehensive development environment. Some popular alternatives include github.dev, GitHub Codespaces, and Devbox Cloud.
76
84
77
85
The choice of which solution to use depends on your specific needs and preferences. Whether you prioritize a comprehensive development environment, a lightweight web-based editor, or a fast and convenient editing experience, there is a solution available to suit your requirements.
78
86
79
87
## The github.dev Web-Based Editor
80
88
81
89
The github.dev editor introduces a lightweight editing experience that runs entirely in your browser. With the github.dev editor, you can navigate files and source code repositories from GitHub, and make and commit code changes. You can open any repository, fork, or pull request in the editor.
82
90
83
-
The github.dev editor is available to everyone for free on GitHub.com.
84
-
85
91
### Opening the github.dev editor
86
92
87
-
You can open any GitHub repository in `github.dev` in either of the following ways:
93
+
You can open the GitHub repository in `github.dev` in either of the following ways:
88
94
89
95
- To open the repository in the same browser tab, press `.` while browsing the repository or pull request on GitHub.
90
96
- To open the repository in a new browser tab, press `>`.
91
97
- Change the URL from `github.com` to `github.dev`.
92
98
- When viewing a file, select the `▾` dropdown menu and click `github.dev`.
The drawback of the github.dev editor is that it doesn't provide a built-in terminal to start the web server. Therefore, you can only preview the changes in real-time, file by file, as a rendered Markdown. However, it's a great option for quick edits and minor contributions.
101
+
102
+
Also, if you need more advanced features, you can navigate to Run and Debug section in the left sidebar and click on the `Continue Working On...` button to open the repository in GitHub Codespaces.
103
+
104
+
[More info](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor) about the github.dev editor.
95
105
96
106
## GitHub Codespaces
97
107
98
-
https://github.com/features/codespaces
108
+
GitHub Codespaces provides a comprehensive development environment in the cloud, allowing you to easily edit and preview the documentation. It offers a full-featured development environment with a terminal, code editor, and integrated Git support. When you open the repository in GitHub Codespaces, the Dev Container with Devbox inside and the VS Code extensions described above will be automatically built and started.
109
+
110
+
To use GitHub Codespaces, follow these steps:
111
+
112
+
1. Fork the repository to your GitHub account.
113
+
2. Follow to [GitHub Codespaces](https://github.com/codespaces) and click on the `New codespace` button.
114
+
3. Select the forked repository from the list of repositories.
115
+
4. Select your region and machine type (the 2-core machine would be enough for this repository).
116
+
5. Wait for the Codespace to be created. The Dev Container will be automatically built and started.
117
+
6. After the Codespace is ready, execute the following commands in the integrated terminal to start the docs web server:
118
+
119
+
```bash
120
+
devbox shell
121
+
122
+
task serve
123
+
```
124
+
125
+
7. After the web server is started, click on the `Open in browser` button to preview the documentation.
126
+
8. Make some changes in the documentation and see that changes are reflected in the browser.
127
+
9. Create a pull request to contribute the changes.
128
+
129
+
[More info](https://docs.github.com/en/codespaces) about GitHub Codespaces.
99
130
100
131
## Devbox Cloud
101
132
102
-
For those who prefer developing in the cloud and wants to instantly preview the end result, the Devbox Cloud is the best option. To use Devbox Cloud, follow these steps:
133
+
Devbox Cloud is a fast alternative to GitHub Codespaces, allowing you to instantly preview changes in the documentation without setting up a local development environment. However, it doesn't provide a full-featured development environment with VS Code extensions like GitHub Codespaces.
134
+
135
+
To use Devbox Cloud, follow these steps:
103
136
104
137
1. Fork the repository to your GitHub account.
105
138
2. Open [devbox.sh](https://devbox.sh/) in your browser.
@@ -113,3 +146,5 @@ For those who prefer developing in the cloud and wants to instantly preview the
113
146
5. Open a new tab in your browser and paste your current Devbox project link in the address bar. Then, add `/port/8000` at the end of the link. For example, if your Devbox project link is `https://devbox.sh/app/projects/proj_your_project_id`, the new link should be `https://devbox.sh/app/projects/proj_your_project_id/port/8000`.
114
147
6. Make some changes in the documentation and see that changes are reflected in the browser.
115
148
7. To contribute the changes, add Devbox Cloud GitHub App to your forked repository and create a pull request.
149
+
150
+
[More info](https://www.jetpack.io/devbox/docs/devbox_cloud/) about Devbox Cloud.
0 commit comments