Skip to content
This repository was archived by the owner on Jun 2, 2020. It is now read-only.

Commit b5a8049

Browse files
authored
Merge pull request #63 from ipfs/fix-package-scripts-and-instructions
Fix package scripts for macOS and improve setup instructions
2 parents d188248 + af83cd0 commit b5a8049

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
node_modules/
12
public/
23
tmp/
34
themes/material/original/

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,27 @@ TODO
2727

2828
## Developing the site
2929

30-
* [Install Hugo](https://gohugo.io/)
31-
* In the root directory, run `hugo server`
30+
### One-Time Setup
31+
32+
1. [Install Hugo](https://gohugo.io/)
33+
2. Install [AEgir](https://www.npmjs.com/package/aegir)
34+
35+
```sh
36+
npm install -g aegir
37+
```
38+
39+
3. Download IPFS libraries and tools (e.g. go-ipfs, js-ipfs) and generate their documentation:
40+
41+
```sh
42+
make packages
43+
```
44+
45+
(Repeat this step anytime a package with autogenerated documentation has a new release.)
46+
47+
48+
### Build and Run the Site
49+
50+
* In the root directory, run `make serve`
3251
* Load http://localhost:1313 in your web browser
3352
* Edit and add things!
3453

scripts/pkg2md.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ baseurl="$4"
2424

2525
echo "--- building docs for $name ($basedir/$name)"
2626

27-
if echo "$name" | grep -P '^go-' > /dev/null; then
27+
if echo "$name" | grep '^go-' > /dev/null; then
2828

2929
# Go: get the source, run godoc2md
3030
#
3131
# TODO also render subdirectories
3232
export GOPATH="$(pwd)/tmp/gopath"
33-
go get "$repo" |& grep -v 'unrecognized import path' || true
33+
go get "$repo" 2>&1 | grep -v 'unrecognized import path' || true
3434
(cd "$GOPATH/src/$repo" && git clean -fdxq && git fetch -q && git reset -q --hard "$ref")
3535
mkdir -p "$basedir/$name"
3636
cat <<EOF > "$basedir/$name/index.md"
@@ -42,7 +42,7 @@ url = "$baseurl/$name"
4242
4343
EOF
4444
godoc2md -v -template scripts/go-pkg.md "$repo" >> "$basedir/$name/index.md"
45-
elif echo "$name" | grep -P '^js-' >/dev/null; then
45+
elif echo "$name" | grep '^js-' >/dev/null; then
4646

4747
# JS: clone repo, npm install, run aegir docs
4848
tmpdir="tmp/js"

0 commit comments

Comments
 (0)