From fa9ddc9da425c5c7cc5e4b10e07fcd575f817b24 Mon Sep 17 00:00:00 2001 From: Rob Brackett Date: Fri, 30 Mar 2018 17:10:02 -0700 Subject: [PATCH 1/2] Fix package script to work on macOS MacOS's grep does not have a `-P` option. I don't think these expressions need it though, so I just removed it. MacOS also does not support `|&`, so swap it out for `2>&1 |` to pipe combined stdout/stderr. License: MIT Signed-off-by: Rob Brackett --- scripts/pkg2md.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" From af83cd0a27742b2c2a1ff895d6410d7bb71e3970 Mon Sep 17 00:00:00 2001 From: Rob Brackett Date: Fri, 30 Mar 2018 17:17:03 -0700 Subject: [PATCH 2/2] Update development instructions in README Include installation of AEgir, downloading/building package docs, and switch `hugo server` to `make serve` since, if we ever need it to do more, we probably want people calling Make instead of Hugo directly. License: MIT Signed-off-by: Rob Brackett --- .gitignore | 1 + README.md | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) 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!