diff --git a/.gitignore b/.gitignore index 1add03f..f1e3f9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +node_modules/ public/ tmp/ themes/material/original/ diff --git a/README.md b/README.md index 975b13b..2dfa107 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,27 @@ TODO ## Developing the site -* [Install Hugo](https://gohugo.io/) -* In the root directory, run `hugo server` +### One-Time Setup + +1. [Install Hugo](https://gohugo.io/) +2. Install [AEgir](https://www.npmjs.com/package/aegir) + + ```sh + npm install -g aegir + ``` + +3. Download IPFS libraries and tools (e.g. go-ipfs, js-ipfs) and generate their documentation: + + ```sh + make packages + ``` + + (Repeat this step anytime a package with autogenerated documentation has a new release.) + + +### Build and Run the Site + +* In the root directory, run `make serve` * Load http://localhost:1313 in your web browser * Edit and add things! diff --git a/scripts/pkg2md.sh b/scripts/pkg2md.sh index 2b73afc..b7a27b0 100755 --- a/scripts/pkg2md.sh +++ b/scripts/pkg2md.sh @@ -24,13 +24,13 @@ baseurl="$4" echo "--- building docs for $name ($basedir/$name)" -if echo "$name" | grep -P '^go-' > /dev/null; then +if echo "$name" | grep '^go-' > /dev/null; then # Go: get the source, run godoc2md # # TODO also render subdirectories export GOPATH="$(pwd)/tmp/gopath" - go get "$repo" |& grep -v 'unrecognized import path' || true + go get "$repo" 2>&1 | grep -v 'unrecognized import path' || true (cd "$GOPATH/src/$repo" && git clean -fdxq && git fetch -q && git reset -q --hard "$ref") mkdir -p "$basedir/$name" cat < "$basedir/$name/index.md" @@ -42,7 +42,7 @@ url = "$baseurl/$name" EOF godoc2md -v -template scripts/go-pkg.md "$repo" >> "$basedir/$name/index.md" -elif echo "$name" | grep -P '^js-' >/dev/null; then +elif echo "$name" | grep '^js-' >/dev/null; then # JS: clone repo, npm install, run aegir docs tmpdir="tmp/js"