Skip to content

Commit f0e5a31

Browse files
committed
remove duplication
1 parent 058df4b commit f0e5a31

File tree

1 file changed

+1
-138
lines changed

1 file changed

+1
-138
lines changed

docs/source/index.md

Lines changed: 1 addition & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -4,147 +4,10 @@ title: Welcome to Elastic Docs v3
44

55
Elastic Docs V3 is our next-generation documentation platform designed to improve the experience of learning, using, and contributing to Elastic products. Built on a foundation of modern authoring tools and scalable infrastructure, V3 offers faster builds, streamlined versioning, and enhanced navigation to guide users through Elastic’s complex ecosystem.
66

7-
**What do you want to do today?**
7+
## What do you want to do today?
88

99
* [Contribute to Elastic documentation](./contribute/index.md)
1010
* [Learn about migration to Elastic Docs V3](./migration/index.md)
1111
* [Configure content sets in V3](./configure/index.md)
1212
* [Learn about V3 syntax](./syntax/index.md)
1313
* [Contribute to V3 (developer guide)](./development/index.md)
14-
15-
## About this repo
16-
17-
This repository is host to:
18-
19-
* *`docs-builder`* command line tool to generate single doc-sets (13mb native code, no dependencies)
20-
* *`docs-assembler`* command line tool to assemble all the doc sets. (IN PROGRESS)
21-
* `elastic/docs-builder@main` Github Action to build and validate a repositories documentation
22-
* *`docs-generator`* command line tool to deterministically generate a docset and incremental updates to generated content
23-
24-
## Command line interface
25-
26-
```bash
27-
$ docs-builder --help
28-
Usage: [command] [options...] [-h|--help] [--version]
29-
30-
Converts a source markdown folder or file to an output folder
31-
32-
Options:
33-
-p|--path <string?> Defaults to the`{pwd}/docs` folder (Default: null)
34-
-o|--output <string?> Defaults to `.artifacts/html` (Default: null)
35-
--path-prefix <string?> Specifies the path prefix for urls (Default: null)
36-
--force <bool?> Force a full rebuild of the destination folder (Default: null)
37-
38-
Commands:
39-
generate Converts a source markdown folder or file to an output folder
40-
serve Continuously serve a documentation folder at http://localhost:5000.
41-
File systems changes will be reflected without having to restart the server.
42-
```
43-
44-
In the near term native code will be published by CI for the following platforms
45-
46-
| OS | Architectures |
47-
|----------|---------------|
48-
| Windows | x64, Arm64 |
49-
| Linux | x64, Arm64 |
50-
| macOS | x64, Arm64 |
51-
52-
And we'll invest time in making sure these are easily obtainable (`brew`, `winget`, `apt`)
53-
54-
For now you can run the tool locally through `docker run`
55-
56-
```bash
57-
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
58-
ghcr.io/elastic/docs-builder:edge
59-
```
60-
61-
This ensures `.git`/`docs` and `.artifacts` (the default output directory) are mounted.
62-
63-
The tool will default to incremental compilation.
64-
Only the changed files on subsequent runs will be compiled unless you pass `--force`
65-
to force a new compilation.
66-
67-
```bash
68-
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
69-
ghcr.io/elastic/docs-builder:edge --force
70-
```
71-
72-
#### Live mode
73-
74-
Through the `serve` command you can continuously and partially compile your documentation.
75-
76-
```bash
77-
docker run -v "./.git:/app/.git" -v "./docs:/app/docs" -v "./.artifacts:/app/.artifacts" \
78-
-p 8080:8080 ghcr.io/elastic/docs-builder:edge serve
79-
```
80-
81-
Each page is compiled on demand as you browse http://localhost:8080 and is never cached so changes to files and
82-
navigation will always be reflected upon refresh.
83-
84-
Note the docker image is `linux-x86` and will be somewhat slower to invoke on OSX due to virtualization.
85-
86-
87-
## Github Action
88-
89-
The `docs-builder` tool is available as github action.
90-
91-
Since it runs from a precompiled distroless image `~25mb` it's able to execute snappy. (no need to wait for building the tool itself)
92-
93-
94-
```yaml
95-
jobs:
96-
docs:
97-
runs-on: ubuntu-latest
98-
steps:
99-
- uses: actions/checkout@v4
100-
- name: Build documentation
101-
uses: elastic/docs-builder@main
102-
```
103-
104-
105-
106-
### GitHub Pages
107-
108-
To set up the tool to publish to GitHub pages use the following configuration.
109-
**NOTE**: In the near feature we'll make this a dedicated single step GitHub action
110-
111-
```yaml
112-
environment:
113-
name: github-pages
114-
url: ${{ steps.deployment.outputs.page_url }}
115-
steps:
116-
- uses: actions/checkout@v4
117-
118-
- name: Publish Github
119-
uses: elastic/docs-builder/actions/publish@main
120-
id: deployment
121-
```
122-
123-
Make sure your repository settings are set up to deploy from GitHub actions see:
124-
125-
https://github.com/elastic/{your-repository}/settings/pages
126-
127-
---
128-
![_static/img/github-pages.png](_static/img/github-pages.png)
129-
130-
---
131-
132-
## Run without docker
133-
134-
You can use the .NET CLI to publish a self-contained `docs-builder` native code
135-
binary. (On my M2 Pro mac the binary is currently 16mb)
136-
137-
Install [.NET 9.0](https://dotnet.microsoft.com/en-us/download/dotnet/9.0), then run:
138-
139-
```bash
140-
dotnet publish "src/docs-builder/docs-builder.csproj"
141-
```
142-
143-
The resulting binary `./.artifacts/publish/docs-builder/release/docs-builder` will run on machines without .NET installed.
144-
145-
# Performance
146-
147-
To test performance it's best to build the binary and run outside of docker:
148-
149-
For reference here's the `markitpy-doc` docset (50k markdown files) currently takes `14s` vs `several minutes` compared to
150-
existing surveyed tools

0 commit comments

Comments
 (0)