docs: document dir-index-html
Steven Allen committed
Apr 21, 2020 at 15:27 UTC
e09b65cb5a37a421b6ae7a1c2af0b5410f3cdca1
1 file changed
+39
-1
assets/README.md
+39
-1
@@ -1,6 +1,13 @@
1
# Assets loaded in with IPFS
2
3
-## Generating docs
3
+This directory contains the go-ipfs assets:
4
+
5
+* Getting started documentation (`init-doc`).
6
+* Directory listing HTML template (`dir-index-html` git submodule).
7
+
8
+These assets are compiled into `bindata.go` with `go generate`.
9
+
10
+## Re-generating
11
12
Do not edit the .go files directly.
13
@@ -10,3 +17,34 @@ assets directory:
17
```
18
go generate .
19
```
20
+
21
+## Updating dir-index-html
22
+
23
+Upstream: https://github.com/ipfs/dir-index-html
24
+
25
+dir-index-html is a git submodule. To update, run the following commands from
26
+this directory.
27
+
28
+```bash
29
+> git -C dir-index-html pull
30
+> git -C dir-index-html checkout vX.Y.Z # target version
31
+```
32
+
33
+Then, you'll need to commit the updated submodule _before_ regenerating
34
+`bindata.go`. Otherwise, `go generate` will checkout the checked-in version of
35
+dir-index-html.
36
+
37
+```bash
38
+> git add dir-index-html
39
+> git commit -m 'chore: update dir-index-html to vX.Y.Z'
40
+```
41
+
42
+Finally, re-generate the directory index HTML template and amend the previous
43
+commit.
44
+
45
+```bash
46
+> go generate .
47
+> git add bindata.go
48
+> git commit --amend --no-edit
49
+
50
+```