Skip to content

Commit d8fd38c

Browse files
author
Slava Katiukha
committed
Update README.md
1 parent f8a6cd1 commit d8fd38c

File tree

1 file changed

+50
-15
lines changed

1 file changed

+50
-15
lines changed

README.md

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Devbox is recommended for users who prefer a quick setup with isolated environme
3434

3535
```bash
3636
devbox shell
37+
3738
task serve
3839
```
3940

@@ -44,7 +45,9 @@ Alternatively, in VS Code, you can run the `Start the Docs web server` task, whi
4445
4546
### Using a Dev Container
4647
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 for everyone who uses it, ensuring that the documentation is built and served in 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:
4851
4952
1. Install [Docker Engine](https://docs.docker.com/engine/install/) if you don't already have it installed.
5053
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
5861
task serve
5962
```
6063
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)
68+
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
69+
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
70+
- [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced)
71+
- [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.
6276
6377
### Developing on Local Machine
6478
6579
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.
6680
6781
## Developing In The Cloud
6882
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.
7684
7785
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.
7886
7987
## The github.dev Web-Based Editor
8088
8189
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.
8290
83-
The github.dev editor is available to everyone for free on GitHub.com.
84-
8591
### Opening the github.dev editor
8692
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:
8894
8995
- To open the repository in the same browser tab, press `.` while browsing the repository or pull request on GitHub.
9096
- To open the repository in a new browser tab, press `>`.
9197
- Change the URL from `github.com` to `github.dev`.
9298
- When viewing a file, select the `▾` dropdown menu and click `github.dev`.
9399
94-
[More info](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor)
100+
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.
95105
96106
## GitHub Codespaces
97107
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.
99130
100131
## Devbox Cloud
101132
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:
103136
104137
1. Fork the repository to your GitHub account.
105138
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
113146
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`.
114147
6. Make some changes in the documentation and see that changes are reflected in the browser.
115148
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

Comments
 (0)