Skip to content

Commit cdd6a0a

Browse files
committed
Update README
1 parent 7e8430a commit cdd6a0a

File tree

1 file changed

+35
-55
lines changed

1 file changed

+35
-55
lines changed

README.md

Lines changed: 35 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,57 @@
1-
# POC doc set builder.
1+
# docs-builder.
22

3+
You've reached the home of the latest incarnation of the documentation tooling.
34

4-
Use `./run.sh` to build and run the `./docs-builder` application without installing any dependencies locally.
5+
This repository is host to:
56

7+
* *`docs-builder`* command line tool to generate single doc-sets (13mb native code, no dependencies)
8+
* *`docs-assembler`* command line tool to assemble all the doc sets. (IN PROGRESS)
9+
* `elastic/docs-builder@main` Github Action to build and validate a repositories documentation
610

7-
## Continuous serve documentation live
811

9-
```bash
10-
$ ./run.sh serve
11-
```
12+
### Docs Builder
13+
14+
In the near term native code will be published by CI for the following platforms
15+
16+
| OS | Architectures |
17+
|----------|---------------|
18+
| Windows | x64, Arm64 |
19+
| Linux | x64, Arm64 |
20+
| macOS | x64, Arm64 |
1221

13-
- Loads the documentation source (by default [`docs/source`](docs/source))
14-
- Serves the docs at http://localhost:8080
15-
- Reacts to changes e.g:
16-
- changing toctree, removing/adding files will cause the site tree to be reconstructed (background)
17-
- markdown content itself is always parsed and converted
22+
And we'll invest time in making sure these are easily obtainable (`brew`, `winget`, `apt`)
1823

19-
If https://github.com/elastic/markitpy-poc is cloned at `../markitpy-poc` relative to this `README.md` it is automatically
20-
mounted by `run.sh`
24+
For now you can run the tool locally through `docker run`
2125

2226
```bash
23-
$ ./run.sh serve --path markitpy-poc/docs/source
27+
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
28+
ghcr.io/elastic/docs-builder:edge
2429
```
2530

26-
Will serve the https://github.com/elastic/markitpy-poc docset at http://localhost:8080
31+
This ensures `.git`/`docs` and `.artifacts` (the default output directory) are mounted.
2732

28-
## Convert to html
33+
The tool will default to incremental compilation.
34+
Only the changed files on subsequent runs will be compiled unless you pass `--force`
35+
to force a new compilation.
2936

3037
```bash
31-
$ ./run.sh generate
38+
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
39+
ghcr.io/elastic/docs-builder:edge --force
3240
```
3341

34-
- Converts documents (by default [`docs/source`](docs/source))
35-
- Outputs HTML to `.artifacts/docs/html/` this path is mounted in docker so can be inspected locally
42+
#### Live mode
3643

37-
Likewise as with `serve` if `..markitpy-poc` is available its auto mounted and can be used to generate HTML.
44+
Through the `serve` command you can continuously and partially compile your documentation.
3845

3946
```bash
40-
$ ./run.sh generate --path markitpy-poc/docs/source
47+
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
48+
--expose 8080 ghcr.io/elastic/docs-builder:edge serve
4149
```
4250

43-
DO NOTE that the container might not be best served to test performance.
51+
Each page is compiled on demand as you browse http://localhost:8080 and is never cached so changes to files and
52+
navigation will always be reflected upon refresh.
4453

45-
E.g simply enumerating the files takes 3x as long as generating with locally build binary.
46-
47-
# Build without docker
54+
# Run without docker
4855

4956
If you have dotnet 8 installed you can use its CLI to publish a self-contained `docs-builder` native code
5057
binary. (On my M2 Pro mac the binary is currently 13mb)
@@ -58,36 +65,9 @@ $ dotnet publish "src/docs-builder/docs-builder.csproj" -c Release -o .artifacts
5865

5966
The resulting binary `./.artifacts/publish/docs-builder` will run on machines without .NET installed
6067

61-
Long term native code will be published by CI for the following platforms
62-
63-
| OS | Architectures |
64-
|----------|---------------|
65-
| Windows | x64, Arm64 |
66-
| Linux | x64, Arm64 |
67-
| macOS | x64, Arm64 |
68-
69-
7068
# Performance
7169

72-
To test performance its best to build the binary and run the code on physical hardware:
73-
74-
For refence here's the `markitpy-doc` generation output on my local machine where it takes `14s`
75-
76-
77-
```bash
78-
$ ./.artifacts/publish/docs-builder generate --path ../markitpy-poc/docs/source/
79-
```
80-
```text
81-
:: generate :: Starting
82-
Fetched documentation set
83-
Resolving tree
84-
Resolved tree
85-
Handled 1010 files
86-
Handled 2013 files
87-
...TRUNCATED...
88-
Handled 5007 files
89-
Handled 56005 files
90-
Handled 57010 files
91-
:: generate :: Finished in '00:00:14.9856495
92-
```
70+
To test performance it's best to build the binary and run outside of docker:
9371

72+
For refence here's the `markitpy-doc` docset (50k markdown files) currently takes `14s` vs `several minutes` compared to
73+
existing surveyed tools

0 commit comments

Comments
 (0)