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
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,56 @@ Edits should be made to the `.rst` files.
4
4
The documentation can be built with `make html` or `make man`.
5
5
The generated files will be found in the `_build` directory.
6
6
7
+
## VSCode Development Container
8
+
9
+
We provide a VSCode [Development Container](https://code.visualstudio.com/docs/remote/containers)
10
+
to provide an environment for you to easily work on the documentation, and ensure that Flux
11
+
is installed to generate some of our Sphinx Gallery (TBA) tutorials. This works by way
12
+
of the assets in [.devcontainer](https://code.visualstudio.com/docs/remote/containers#_create-a-devcontainerjson-file).
13
+
14
+
### Setup
15
+
16
+
You can follow the [tutorial](https://code.visualstudio.com/docs/remote/containers-tutorial) where you'll basically
17
+
need to:
18
+
19
+
1. Install Docker
20
+
2. Install the [Development Containers](vscode:extension/ms-vscode-remote.remote-containers) extension
21
+
22
+
Then you can go to the command palette (View -> Command Palette) and select `Dev Containers: Open Workspace in Container.`
23
+
and select your cloned Flux Docs repository root. This will build a development environment from [fluxrm/flux-sched](https://hub.docker.com/r/fluxrm/flux-sched/tags).
24
+
25
+
While this uses the focal base, you are free to change the base image and rebuild if you need to test on another operating system!
26
+
When your container is built, when you open `Terminal -> New Terminal` and you'll be in the container!
27
+
You should be able to build docs:
28
+
29
+
```bash
30
+
$ make html
31
+
```
32
+
33
+
And then you can do as you would do on your host to start a local webserver:
34
+
35
+
```console
36
+
..
37
+
The HTML pages are in _build/html.
38
+
39
+
$ cd _build/html/
40
+
$ python3 -m http.server 9999
41
+
Serving HTTP on 0.0.0.0 port 9999 (http://0.0.0.0:9999/) ...
42
+
```
43
+
VSCode is smart enough to see you open the port and give you a button to click to open it in
44
+
the browser! If not, you can open your browser to [http://localhost:9999/](http://localhost:9999/).
45
+
We will provide further instructions here for building sphinx examples as they are added.
46
+
47
+
**Important** it's recommended that you commit (or otherwise write to the .git folder) from the outside
48
+
of the container. This will allow you to sign commits with your (not mounted to the container) key,
49
+
and will ensure the permissions of the commit are not done by a root user.
50
+
If you accidentally do this and need to fix, you can run this from your terminal outside of VSCode:
51
+
52
+
```bash
53
+
$ sudo chown -R $USER .git/
54
+
# and then commit
55
+
```
56
+
7
57
## Installing Sphinx
8
58
9
59
Sphinx is used to generate man pages from the `.rst` files.
0 commit comments