Skip to content

Commit 30ccc0e

Browse files
authored
Update README about devcontainer use
1 parent 36217dd commit 30ccc0e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,23 @@ You can open this repo on GitHub to read, use the GitHub Pages for a published v
2222
For example, it is easy to use `.` to start the GitHub Web Editor to read and edit these files.
2323

2424

25-
## Build instructions
25+
### Build using container
2626
To create the HTML output, you can use:
2727

2828
```
2929
$ podman run --rm -v $PWD:/workspace quay.io/crc-org/mdbook:0.4.43 build
3030
```
3131

3232
This will create a `book` folder that contains the output for a static webpage like GitHub Pages.
33+
34+
35+
### Devcontainer
36+
You can also use the devcontainer setup. This will start the generation container and allows you to use the `mdbook` command line directly from inside the editor.
37+
38+
This can be started from CodeSpaces, VS Code or the CLI
39+
```shell
40+
$ npm install -g @devcontainers/cli
41+
$ devcontainer up --workspace-folder .
42+
```
43+
44+
After the container has been started, you can use `mdbook build` to generate the output, and `mdbook serve` to open a preview using the forward of port 3000.

0 commit comments

Comments
 (0)