From 30ccc0ef70919542d6c943e4597cf2fb5c163d6e Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Thu, 5 Dec 2024 04:54:52 +0000 Subject: [PATCH] Update README about devcontainer use --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 47c9cb6..d83c864 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You can open this repo on GitHub to read, use the GitHub Pages for a published v For example, it is easy to use `.` to start the GitHub Web Editor to read and edit these files. -## Build instructions +### Build using container To create the HTML output, you can use: ``` @@ -30,3 +30,15 @@ $ podman run --rm -v $PWD:/workspace quay.io/crc-org/mdbook:0.4.43 build ``` This will create a `book` folder that contains the output for a static webpage like GitHub Pages. + + +### Devcontainer +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. + +This can be started from CodeSpaces, VS Code or the CLI +```shell +$ npm install -g @devcontainers/cli +$ devcontainer up --workspace-folder . +``` + +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. \ No newline at end of file