diff --git a/.gitignore b/.gitignore index d4f36adbb..4f8481603 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ docs/_build *.log abci-cli docs/node_modules/ +index.html.md scripts/wal2json/wal2json scripts/cutWALUntil/cutWALUntil diff --git a/Makefile b/Makefile index 86dcc63fc..7a7273b6f 100644 --- a/Makefile +++ b/Makefile @@ -246,6 +246,12 @@ metalinter_all: @echo "--> Running linter (all)" gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./... +DESTINATION = ./index.html.md + +rpc-docs: + cat rpc/core/slate_header.txt > $(DESTINATION) + godoc2md -template rpc/core/doc_template.txt github.com/tendermint/tendermint/rpc/core | grep -v -e "pipe.go" -e "routes.go" -e "dev.go" | sed 's,/src/target,https://github.com/tendermint/tendermint/tree/master/rpc/core,' >> $(DESTINATION) + check_dep: dep status >> /dev/null !(grep -n branch Gopkg.toml) @@ -305,4 +311,4 @@ build-slate: # To avoid unintended conflicts with file names, always add to .PHONY # unless there is a reason not to. # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html -.PHONY: check build build_race build_abci dist install install_abci check_dep check_tools get_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate protoc_grpc protoc_all +.PHONY: check build build_race build_abci dist install install_abci check_dep check_tools get_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt rpc-docs build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate protoc_grpc protoc_all diff --git a/rpc/core/README.md b/rpc/core/README.md index 9547079b2..32c3051e3 100644 --- a/rpc/core/README.md +++ b/rpc/core/README.md @@ -1,18 +1,15 @@ # Tendermint RPC -## Generate markdown for [Slate](https://github.com/tendermint/slate) - -We are using [Slate](https://github.com/tendermint/slate) to power our RPC +We are using [Slate](https://github.com/lord/slate) to power our RPC documentation. For generating markdown use: ```shell go get github.com/davecheney/godoc2md -godoc2md -template rpc/core/doc_template.txt github.com/tendermint/tendermint/rpc/core | grep -v -e "pipe.go" -e "routes.go" -e "dev.go" | sed 's$/src/target$https://github.com/tendermint/tendermint/tree/master/rpc/core$' +# from root of this repo +make rpc-docs ``` -For more information see the [CI script for building the Slate docs](/scripts/slate.sh) - ## Pagination Requests that return multiple items will be paginated to 30 items by default. diff --git a/rpc/core/slate_header.txt b/rpc/core/slate_header.txt new file mode 100644 index 000000000..bb4ca6e03 --- /dev/null +++ b/rpc/core/slate_header.txt @@ -0,0 +1,13 @@ +--- +title: RPC Reference + +language_tabs: # must be one of https://git.io/vQNgJ + - shell + - go + +toc_footers: + - Tendermint + - Documentation Powered by Slate + +search: true +---