Skip to content

Commit 8572c49

Browse files
committed
Add README
1 parent f9152a2 commit 8572c49

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

.vscode/tasks.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222
"kind": "build",
2323
"isDefault": true
2424
}
25-
}
25+
},
26+
{
27+
"label": "Build Documentation (Full (--force))",
28+
"type": "shell",
29+
"command": "docker run -v \"./.git:/app/.git\" -v \"./docs:/app/docs\" -v \"./.artifacts:/app/.artifacts\" ghcr.io/elastic/docs-builder:edge --force",
30+
"problemMatcher": [],
31+
"group": {
32+
"kind": "build",
33+
"isDefault": true
34+
}
35+
},
2636
]
2737
}

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# docs-builder playground
2+
3+
This repository exists to be used as a playground by everyone in the `docs-team` to test https://github.com/elastic/docs-builder
4+
5+
## Usage
6+
7+
Simply clone the repository and open in VS Code.
8+
9+
Then you can use the builtin build command `CMD+SHIFT+B` to build this repositories documentation.
10+
11+
![Build Tasks](docs/source/_static/img/build-tasks.png)
12+
13+
14+
* Incremental: does a full build initially after which it will only compile changed files on each subsequent invocation
15+
* Full: always does a full build.
16+
* Serve: serves the documentation in 'live' mode at http://localhost:8080.
17+
- All changes should be reflected on the live site without restarting.
18+
19+
20+
## Non VS Code usage
21+
22+
### Incremental
23+
24+
```bash
25+
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
26+
ghcr.io/elastic/docs-builder:edge
27+
```
28+
29+
This ensures `.git`/`docs` and `.artifacts` (the default output directory) are mounted.
30+
31+
### Full (--force)
32+
33+
```bash
34+
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
35+
ghcr.io/elastic/docs-builder:edge --force
36+
```
37+
38+
### Live mode
39+
40+
```bash
41+
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
42+
--expose 8080 ghcr.io/elastic/docs-builder:edge serve
43+
```
142 KB
Loading

0 commit comments

Comments
 (0)