Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docs using slate #1

Closed
wants to merge 3 commits into from
Closed

Added docs using slate #1

wants to merge 3 commits into from

Conversation

cyrusaf
Copy link
Contributor

@cyrusaf cyrusaf commented Jan 16, 2018

Added docs using slate docs. Added make commands to automatically setup/dev/build/publish docs to gh-pages. Slate requires ruby >= 2.3.1.

TODO:

  • docs/README

@hyandell
Copy link
Contributor

Noting that the code of conduct should use our standard text/approach, rather than slate's. See oss-dashboard's CONTRIBUTING file ( https://github.com/amzn/oss-dashboard/ ).

docs/LICENSE Outdated
@@ -0,0 +1,13 @@
Copyright 2008-2013 Concur Technologies, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a source header and not a license file.

Are Concur the author of Slate? ie: It's injecting its license into its output?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe they are. I'm new to open source -- is it ok to remove the docs/LICENSE file? Almost everything inside docs/* is cloned from the slate github repo.

Copy link
Contributor

@spenczar spenczar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

Please delete the .DS_Store files and the logo-old.png file.

The content lives in a separate branch?

docs/README.md Outdated
Features
------------

* **Clean, intuitive design** — With Slate, the description of your API is on the left side of your documentation, and all the code examples are on the right side. Inspired by [Stripe's](https://stripe.com/docs/api) and [Paypal's](https://developer.paypal.com/webapps/developer/docs/api/) API docs. Slate is responsive, so it looks great on tablets, phones, and even in print.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop Slate's marketing copy from this file.

Makefile Outdated
@@ -30,6 +30,21 @@ setup:
GOPATH=$(CURDIR)/_tools go install github.com/twitchtv/retool/...
$(RETOOL) build

# Make commands for twirp docs
setup_docs:
echo "Ruby >= 2.3.1 must be installed"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use @echo "Ruby >= 2.3.1 must be installed" here. Without a leading @, Make will print the line, so you'll double-echo.

@@ -0,0 +1,117 @@
# Changelog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Slate's changelog? Let's remove it.

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is slate's, so we should remove it, too.

We might want one for the repo root, but let's do that separately.

docs/README.md Outdated
4. Initialize and start Slate. You can either do this locally, or with Vagrant:

```shell
# either run this to run locally
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, let's recommend the make dev_docs command.

> Install the Twirp compiler plugin `protoc-gen-twirp`:

```bash
$ go get -u code.justin.tv/common/twirp/protoc-gen-twirp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to github.com/twitchtv/twirp/protoc-gen-twirp

> If you are using [retool](https://github.com/twitchtv/retool), update using the following command:

```bash
$ retool upgrade code.justin.tv/common/twirp/protoc-gen-twirp v4.4.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to github.com/twitchtv/twirp/protoc-gen-twirp

$ retool upgrade code.justin.tv/common/twirp/protoc-gen-twirp v4.4.0
```

Twirp releases are tagged with semantic versioning and releases are managed by Github. See the [releases](https://git-aws.internal.justin.tv/common/twirp/releases) page.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to public URL

> Use `go install` to update twirp if you don't have retool:

```golang
$ cd $GOPATH/src/code.justin.tv/common/twirp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be public path


```golang
$ cd $GOPATH/src/code.justin.tv/common/twirp
$ git checkout v4.4.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're on v5.0.0 with the open source release, please update this line

cd docs && bundle exec middleman build --clean

publish_docs: build_docs
git add docs/build && git push origin `git subtree split --prefix docs/build`:gh-pages --force
Copy link
Contributor Author

@cyrusaf cyrusaf Jan 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to get 👀 on this command. It builds the html files, then automatically pushes them to the gh-pages branch of whichever fork/repo you are working on. Is there a better way of doing this (a way to review the outgoing changes to the docs/build folder on github before they are pushed to gh-pages)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs/build folder will just hold the built HTML documents, we can still review the source, right?

It would be nice if we could push a preview, yes. I don't know that GH pages has the flexibility to allow it, though. This might be the best we'll get within github pages.

@spenczar
Copy link
Contributor

Slate really is kind of a pain to work with. Let's follow github.com/golang/dep's lead and use http://docusaurus.io/. I like the way the docs look and I especially like how simple it is.

@spenczar spenczar closed this Jan 25, 2018
mikeylemmon added a commit to gnarbox/twirp that referenced this pull request May 21, 2018
RMRF-263: twirp streams POC

Approved-by: Kaushik Sahoo <kaushik@gnarbox.com>
Approved-by: Robert Weber <robertweber95@gmail.com>
Approved-by: David Manpearl <dmanpearl@pixelmonks.com>
Approved-by: Ben Balaran <ben@gnarbox.com>
spenczar pushed a commit that referenced this pull request Dec 16, 2019
allow chaining multiple ClientHooks
QuantumGhost added a commit to QuantumGhost/twirp that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants