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
+75-12Lines changed: 75 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,12 @@
1
-
# Staging the Docs on Your Local Machine
1
+
# Cloud Scripting Documentation
2
+
3
+
This repository contains the source files for the Cloud Scripting documentation. The documentation is built using [MkDocs](https://www.mkdocs.org/), a static site generator geared towards project documentation.
4
+
5
+
Topics submitted here will be published to the [Cloud Scripting portal](https://docs.cloudscripting.com/).
6
+
7
+
To start editing the documentation on your local machine or in the cloud, follow the instructions below.
8
+
9
+
## Staging the Docs on Your Local Machine
2
10
3
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:
4
12
@@ -9,9 +17,9 @@ cd cloudscripting-docs
9
17
10
18
After cloning the repository, you have two options to run the docs web server: using a Devbox isolated shell or a Dev Container.
11
19
12
-
**Devbox** provides a faster alternative by installing all dependencies into an isolated shell, while **Dev Container** offers more isolation and could be simpler to install.
20
+
**Devbox** provides a faster alternative by installing all dependencies into an isolated shell without an extra layer of virtualization slowing down your file system or every command. On the other hand, **Dev Container** offers more isolation and provides greater portability, allowing you to easily share and replicate your development environment across different machines. The Dev Container in this repository uses **Devbox** inside to provide a consistent shell for everyone who uses it.
13
21
14
-
## Using Devbox
22
+
###Using Devbox
15
23
16
24
Devbox is recommended for users who prefer a quick setup with isolated environments. Follow these steps to use Devbox:
17
25
@@ -34,19 +42,74 @@ Alternatively, in VS Code, you can run the `Start the Docs web server` task, whi
34
42
- Use the command palette in VS Code (Ctrl+Shift+P or Cmd+Shift+P), type`Tasks: Run Task`, and select`Start the Docs web server`.
35
43
- Or, navigate to `Terminal -> Run Task...` and choose `Start the Docs web server`.
36
44
37
-
## Using a Dev Container
45
+
### Using a Dev Container
46
+
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
+
49
+
1. Install [Docker Engine](https://docs.docker.com/engine/install/) if you don't already have it installed.
50
+
2. Install the **Dev Containers** extension in VS Code.
51
+
3. Open the `cloudscripting-docs` repository in VS Code.
52
+
4. Use the command palette (Ctrl+Shift+P or Cmd+Shift+P), type `Dev Containers: Reopen in Container`, and select it.
53
+
5. VS Code will rebuild the container using the `.devcontainer` folder's configuration.
54
+
6. Once the container is ready, you're set to work within the Dev Container environment.
55
+
7. To start the docs, issue this command in the integrated terminal:
56
+
57
+
```bash
58
+
task serve
59
+
```
60
+
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.
62
+
63
+
### Developing on Local Machine
64
+
65
+
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
+
67
+
## Developing In The Cloud
68
+
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.
76
+
77
+
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
+
79
+
## The github.dev Web-Based Editor
80
+
81
+
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
+
83
+
The github.dev editor is available to everyone for free on GitHub.com.
84
+
85
+
### Opening the github.dev editor
86
+
87
+
You can open any GitHub repository in `github.dev` in either of the following ways:
88
+
89
+
- To open the repository in the same browser tab, press `.` while browsing the repository or pull request on GitHub.
90
+
- To open the repository in a new browser tab, press `>`.
91
+
- Change the URL from `github.com` to `github.dev`.
92
+
- When viewing a file, select the `▾` dropdown menu and click `github.dev`.
For those preferring VS Code and seeking greater isolation, the Dev Container method is ideal. Follow these steps:
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:
40
103
41
-
1. Install the **Dev Containers** extension in VS Code.
42
-
2. Open the `cloudscripting-docs` repository in VS Code.
43
-
3. Use the command palette (Ctrl+Shift+P or Cmd+Shift+P), type`Dev Containers: Reopen in Container`, and selectit.
44
-
4. VS Code will rebuild the container using the `.devcontainer` folder's configuration.
45
-
5. Once the container is ready, you're set to work within the Dev Container environment.
46
-
6. To start the docs, issue this commandin the integrated terminal:
104
+
1. Fork the repository to your GitHub account.
105
+
2. Open [devbox.sh](https://devbox.sh/) in your browser.
106
+
3. Paste the forked repository URL in the input field and click **Go**.
107
+
4. After the integrated terminal is ready, execute the following command to start the docs web server:
47
108
48
109
```bash
49
110
task serve
50
111
```
51
112
52
-
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.
113
+
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
+
6. Make some changes in the documentation and see that changes are reflected in the browser.
115
+
7. To contribute the changes, add Devbox Cloud GitHub App to your forked repository and create a pull request.
0 commit comments