Skip to content

Commit df8dd9f

Browse files
committed
Update README.md
1 parent d8fd38c commit df8dd9f

File tree

1 file changed

+83
-80
lines changed

1 file changed

+83
-80
lines changed

README.md

Lines changed: 83 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,83 @@ This repository contains the source files for the Cloud Scripting documentation.
44

55
Topics submitted here will be published to the [Cloud Scripting portal](https://docs.cloudscripting.com/).
66

7-
To start editing the documentation on your local machine or in the cloud, follow the instructions below.
7+
To start editing the documentation in the cloud or on your local machine, follow the instructions below.
8+
9+
## Developing In The Cloud
10+
11+
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.
12+
13+
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.
14+
15+
## GitHub Codespaces
16+
17+
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](#vs-code-preinstalled-extensions) will be automatically built and started.
18+
19+
To use GitHub Codespaces, follow these steps:
20+
21+
1. Fork the repository to your GitHub account.
22+
2. Follow to [GitHub Codespaces](https://github.com/codespaces) and click on the `New codespace` button.
23+
3. Select the forked repository from the list of repositories.
24+
4. Select your region and machine type (the 2-core machine would be enough for this repository).
25+
5. Wait for the Codespace to be created. The Dev Container will be automatically built and started.
26+
6. After the Codespace is ready, execute the following commands in the integrated terminal to start the docs web server:
27+
28+
```bash
29+
task serve
30+
```
31+
32+
Alternatively, you can run the `Start the Docs web server` task in VS Code. To do this, select `Terminal -> Run Task...` in the main menu and choose `Start the Docs web server`.
33+
7. After the web server is started, click on the `Open in browser` button to preview the documentation.
34+
8. Make some changes in the documentation and see that changes are reflected in the browser.
35+
9. Create a pull request to contribute the changes.
36+
37+
[More info](https://docs.github.com/en/codespaces) about GitHub Codespaces.
38+
39+
## The github.dev Web-Based Editor
40+
41+
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.
42+
43+
### Opening the github.dev editor
44+
45+
You can open the GitHub repository in `github.dev` in either of the following ways:
46+
47+
- To open the repository in the same browser tab, press `.` while browsing the repository or pull request on GitHub.
48+
- To open the repository in a new browser tab, press `>`.
49+
- Change the URL from `github.com` to `github.dev`.
50+
- When viewing a file, select the `` dropdown menu and click `github.dev`.
51+
52+
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.
53+
54+
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.
55+
56+
[More info](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor) about the github.dev editor.
57+
58+
## Devbox Cloud
59+
60+
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.
61+
62+
To use Devbox Cloud, follow these steps:
63+
64+
1. Fork the repository to your GitHub account.
65+
2. Open [devbox.sh](https://devbox.sh/) in your browser.
66+
3. Paste the forked repository URL in the input field and click **Go**.
67+
4. After the integrated terminal is ready, execute the following command to start the docs web server:
68+
69+
```bash
70+
task serve
71+
```
72+
73+
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`.
74+
6. Make some changes in the documentation and see that changes are reflected in the browser.
75+
7. To contribute the changes, add Devbox Cloud GitHub App to your forked repository and create a pull request.
76+
77+
[More info](https://www.jetpack.io/devbox/docs/devbox_cloud/) about Devbox Cloud.
878
979
## Staging the Docs on Your Local Machine
1080
11-
This guide walks you through the process of staging the documentation locally using either a Devbox or a Dev Container. First, you need to clone the repository:
81+
This guide is intended for those who prefer to develop locally. Please note that setting up the local development environment may require additional effort.
82+
83+
To get started, you need to clone the repository:
1284
1385
```bash
1486
git clone [email protected]:virtuozzo/cloudscripting-docs.git
@@ -61,6 +133,15 @@ Here are the steps to use Dev Container in VS Code:
61133
task serve
62134
```
63135
136+
8. Open your browser and navigate to [http://localhost:8000/](http://localhost:8000/) to preview the documentation. MkDocs will incrementally rebuild the site with each file change and those changes will be reflected in the browser.
137+
9. To contribute the changes, create a pull request.
138+
139+
> **Note:**
140+
> 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.
141+
>
142+
143+
#### VS Code Preinstalled Extensions
144+
64145
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:
65146
66147
- [devbox by jetpack.io](https://marketplace.visualstudio.com/items?itemName=jetpack-io.devbox)
@@ -70,81 +151,3 @@ In addition, the Dev Container in this repository is configured to install neces
70151
- [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced)
71152
- [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.
72153
- [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.
76-
77-
### Developing on Local Machine
78-
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.
80-
81-
## Developing In The Cloud
82-
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.
84-
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.
86-
87-
## The github.dev Web-Based Editor
88-
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.
90-
91-
### Opening the github.dev editor
92-
93-
You can open the GitHub repository in `github.dev` in either of the following ways:
94-
95-
- To open the repository in the same browser tab, press `.` while browsing the repository or pull request on GitHub.
96-
- To open the repository in a new browser tab, press `>`.
97-
- Change the URL from `github.com` to `github.dev`.
98-
- When viewing a file, select the `▾` dropdown menu and click `github.dev`.
99-
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.
105-
106-
## GitHub Codespaces
107-
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.
130-
131-
## Devbox Cloud
132-
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:
136-
137-
1. Fork the repository to your GitHub account.
138-
2. Open [devbox.sh](https://devbox.sh/) in your browser.
139-
3. Paste the forked repository URL in the input field and click **Go**.
140-
4. After the integrated terminal is ready, execute the following command to start the docs web server:
141-
142-
```bash
143-
task serve
144-
```
145-
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`.
147-
6. Make some changes in the documentation and see that changes are reflected in the browser.
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

Comments
 (0)