|
1 | 1 | # Bazel Docs |
2 | 2 |
|
3 | | -Convert Bazel’s Devsite docs into a Hugo/Docsy site for easy modification. |
| 3 | +Host Bazel’s Devsite docs on a Mintlify site for easy modification. |
4 | 4 |
|
5 | 5 | ## Motivation |
6 | 6 |
|
7 | 7 | This tool implements the improvements outlined in [Bazel Docs: Why It Might Be Time For A Refresh](https://alanmond.com/posts/bazel-documentation-improvements/). The goal is to create a more developer friendly set of Bazel Docs. Starting with [bazel.build/docs](https://bazel.build/docs) |
8 | 8 |
|
9 | 9 | ## Live Demo |
10 | 10 |
|
11 | | -https\://bazel-docs-68tmf.ondigitalocean.app/ |
| 11 | +https://bazel.online |
12 | 12 |
|
13 | 13 | ## How it works |
14 | 14 |
|
15 | | -1. Clones the Devsite source from `bazel.build/docs`. |
16 | | -2. Transforms Devsite frontmatter and directory layout into Hugo/Docsy format. |
17 | | -3. Converts CSS/SCSS for Docsy theme compatibility. |
| 15 | +1. Clones the Devsite source from `bazel.build/docs` using a git submodule |
| 16 | +2. Transforms Devsite frontmatter and directory layout into MDX format. |
| 17 | +3. Hosted on Mintlify |
18 | 18 |
|
19 | 19 | ## Usage |
20 | 20 |
|
21 | | -Bash into the docker image to see the Hugo converted website: |
| 21 | +Clone the submodule: `git submodule update --init -- upstream` |
22 | 22 |
|
23 | | -```bash |
24 | | -docker run -it -p 1313:1313 alan707/bazel-docs:latest bash |
25 | | -``` |
| 23 | +Run the converter tool: TODO |
26 | 24 |
|
27 | | -Once inside, the generated Hugo site will be at the following location: |
| 25 | +Install the Mintlify dev tool: `npm install -g mint` |
28 | 26 |
|
29 | | -```bash |
30 | | -root@7feab7b056d2:/app/docs# ls -al /app/docs |
31 | | -total 52 |
32 | | -drwxr-xr-x 1 root root 4096 Jul 15 05:53 . |
33 | | -drwxr-xr-x 1 root root 4096 Jul 15 05:53 .. |
34 | | --rw-r--r-- 1 root root 0 Jul 15 05:53 .hugo_build.lock |
35 | | -drwxr-xr-x 2 root root 4096 Jul 15 05:53 archetypes |
36 | | -drwxr-xr-x 3 root root 4096 Jul 15 05:53 assets |
37 | | -drwxr-xr-x 25 root root 4096 Jul 15 05:53 content |
38 | | -drwxr-xr-x 2 root root 4096 Jul 15 05:53 data |
39 | | --rw-r--r-- 1 root root 99 Jul 15 05:53 go.mod |
40 | | --rw-r--r-- 1 root root 394 Jul 15 05:53 go.sum |
41 | | --rw-r--r-- 1 root root 2527 Jul 15 05:53 hugo.yaml |
42 | | -drwxr-xr-x 2 root root 4096 Jul 15 05:53 i18n |
43 | | -drwxr-xr-x 2 root root 4096 Jul 15 05:53 layouts |
44 | | -drwxr-xr-x 3 root root 4096 Jul 15 05:53 resources |
45 | | -drwxr-xr-x 12 root root 4096 Jul 15 05:53 static |
46 | | -``` |
| 27 | +Then run `mint dev` to get a locally-running site. |
47 | 28 |
|
48 | | -To test your changes, you can convert the Bazel Docs Devsite into a Hugo website running this command |
49 | | -```bash |
50 | | -root@7feab7b056d2:/app# python /app/cli.py convert --source /app/work/bazel-source/site/en/ --output /app/docs/ |
51 | | -``` |
52 | | - |
53 | | -Add the modules needed (mainly Docsy) |
54 | | -```bash |
55 | | -cd /app/docs |
56 | | -hugo mod init github.com/alan707/bazel-docs && \ |
57 | | - hugo mod get github.com/google/docsy@v0.12.0 && \ |
58 | | - hugo mod tidy |
59 | | -``` |
60 | | - |
61 | | -Generate static files and start the Hugo server |
62 | | -```bash |
63 | | -cd /app/docs |
64 | | -hugo --destination /workspace/public |
65 | | -hugo server --bind 0.0.0.0 --baseURL "http://localhost:1313" |
66 | | -``` |
| 29 | +Send a PR to get a hosted preview of the changes. |
0 commit comments