Skip to content

Commit c4c7464

Browse files
refresh the instructions for building the docs
Various minor changes: - gitignore the Jekyll output directory even if you run Jekyll from the repo root. - gitignore the WASM file since it's a build output. - Get rid of tools/scripts/serve_docs.sh - it's no longer needed since Jekyll 4.3.0 which fixed the Content-Type for WASM files (jekyll/jekyll#8965) 4.3.0 was released October 2020. - In push_docs, when checking out the repo to the working directory, directly check out the gh-pages branch instead of checking out HEAD and then switching branch. - Update instructions accordingly.
1 parent ce74438 commit c4c7464

File tree

5 files changed

+17
-73
lines changed

5 files changed

+17
-73
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ bazel-*
3636
/dist/
3737
/jsonnet.egg-info/
3838
/doc/.jekyll-cache/
39+
/production/
40+
/doc/production/
41+
/doc/js/libjsonnet.wasm
3942

4043
# Cmake
4144
**/CMakeCache.txt

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,19 @@ Or you can build it yourself, which requires checking out
157157
[go-jsonnet](https://github.com/google/go-jsonnet). See the README.md in
158158
that repo for instructions.
159159

160-
Then, from the root of the repository you can generate and serve the website using
161-
[Jekyll](https://jekyllrb.com/):
160+
The standard library is documented in a structured format in `doc/_stdlib_gen/stdlib-content.jsonnet`.
161+
The HTML (input for Jekyll) is regenerated using the following command:
162162

163163
```
164-
tools/scripts/serve_docs.sh
164+
tools/scripts/update_web_content.sh
165165
```
166166

167-
This should the website on localhost:8200, automatically rebuild when you change any underlying
168-
files, and automatically refresh your browser when that happens.
169-
170-
The standard library is documented in a structured format in `doc/_stdlib_gen/stdlib-content.jsonnet`.
171-
The HTML (input for Jekyll) is regenerated using the following command:
167+
Then, from the root of the repository you can generate and serve the website using
168+
[Jekyll](https://jekyllrb.com/) (you need version 4.3.0 or later):
172169

173170
```
174-
tools/scripts/update_web_content.sh
171+
jekyll serve -s doc/
175172
```
173+
174+
This should build and serve the website locally, and automatically rebuild
175+
when you change any underlying files.

release_checklist.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Before doing the release, make sure that the project is in good state:
3535
* Make sure that the stdlib documentation is complete. Check the release notes for any
3636
additions or changes to stdlib and make sure they are reflected in the documentation.
3737
* Make sure that you can build the website locally.
38-
* `make doc/js/libjsonnet.js`
39-
* `tools/scripts/serve_docs.sh`
38+
* Download or build libjsonnet.wasm (see README.md for instructions)
39+
* `jekyll serve -s doc/` (you need Jekyll 4.3.0 or later) to serve the site locally to check it.
4040
* Check that it works in two different browsers. Make sure that live evaluation
4141
in the tutorial works.
4242

@@ -98,8 +98,8 @@ in one sitting and fix any unexpected problems.
9898
## Update the website
9999

100100
In google/jsonnet:
101-
* `make doc/js/libjsonnet.js`
102-
* `tools/scripts/serve_docs.sh`
101+
* Build or download libjsonnet.wasm (see README.md)
102+
* `jekyll serve -s docs/`
103103
* Check that the local version works in two different browsers. Make sure that live evaluation in the tutorial works.
104104
* `tools/scripts/push_docs.sh`
105105
* Check that the public works in two different browsers. Make sure that you are getting the new version (and not an old cached version). Make sure that live evaluation in the tutorial works.

tools/scripts/push_docs.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if [ -z "$working_dir" ]; then
5656
trap "rm -rf ${working_dir}" EXIT
5757
fi
5858

59-
git clone $JSONNET_REPO "$working_dir"
59+
git clone -b gh-pages $JSONNET_REPO "$working_dir"
6060

6161
(
6262
cd "$working_dir"
@@ -74,5 +74,3 @@ jekyll build -d "$working_dir"
7474
git commit -am "Update docs."
7575
git push -u origin gh-pages
7676
)
77-
78-

tools/scripts/serve_docs.sh

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)