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

Fix package scripts for macOS and improve setup instructions #63

Merged
merged 2 commits into from
Apr 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
public/
tmp/
themes/material/original/
Expand Down
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down
6 changes: 3 additions & 3 deletions scripts/pkg2md.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF > "$basedir/$name/index.md"
Expand All @@ -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"
Expand Down