Skip to content

Commit 2cd1830

Browse files
authored
Update README.md (#7)
Updated README with more instructions.
1 parent 3ac0a97 commit 2cd1830

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

README.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,49 @@ https\://bazel-docs-68tmf.ondigitalocean.app/
1818

1919
## Usage
2020

21-
Run the latest build locally:
21+
Bash into the docker image to see the Hugo converted website:
2222

2323
```bash
24-
docker run -it -p 1313:1313 alan707/bazel-docs:latest
24+
docker run -it -p 1313:1313 alan707/bazel-docs:latest bash
2525
```
2626

27-
Build a new image:
27+
Once inside, the generated Hugo site will be at the following location:
2828

2929
```bash
30-
docker build . -t bazel_docs:latest
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
3146
```
3247

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+
```

0 commit comments

Comments
 (0)