From 16734dbee82eca0a1b5cd51cad2839be042d0fe7 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Fri, 10 May 2019 12:07:16 +0100 Subject: [PATCH] Add make targets for serving docs locally --- .gitignore | 1 + docs/Makefile | 18 ++++++++++++++++++ docs/README.md | 13 +++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 docs/Makefile create mode 100644 docs/README.md diff --git a/.gitignore b/.gitignore index f6e5055..a5f59b4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ release .godeps *.exe .env +.bundle # Go.gitignore # Compiled Object files, Static and Dynamic libs (Shared Objects) diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..1824ba0 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,18 @@ +.PHONY: ruby +ruby: + @ if [ ! $$(which ruby) ]; then \ + echo "Please install ruby version 2.1.0 or higher"; \ + fi + +.PHONY: bundle +bundle: ruby + @ if [ ! $$(which bundle) ]; then \ + echo "Please install bundle: `gem install bundler`"; \ + fi + +vendor/bundle: bundle + bundle install --path vendor/bundle + +.PHONY: serve +serve: vendor/bundle + bundle exec jekyll serve diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..d76b985 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,13 @@ +# Docs + +This folder contains our Jekyll based docs site which is hosted at +https://pusher.github.io/oauth2_proxy. + +When making changes to this docs site, please test your changes locally: + +```bash +make serve +``` + +To run the docs site locally you will need Ruby at version 2.1.0 or +higher and `bundle` (`gem install bundler` if you already have Ruby).