Skip to content

Commit

Permalink
get API docs hosted via GitHub pages (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniszewski committed Apr 12, 2018
1 parent 6bfae3f commit cd664a5
Show file tree
Hide file tree
Showing 14 changed files with 1,723 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,20 @@ api-doc: ## Open the API doc HTML reference
open ./docs/api/build/index.html

.PHONY: docs
docs: ## Generate the Synse Server documentation locally
docs: clean-docs ## Generate the Synse Server User and API documentation locally
# User Guide Documentation (see docs/build/html/index.html for output)
(cd docs; make html)
# API Documentation (see docs/index.html for output)
docker build -f docs/Dockerfile -t vaporio/slate-docs docs
@if [ -d "docs/api/build" ]; then rm -rf docs/api/build; fi;
docker run --name slate-docs -v `pwd`/docs/api:/source vaporio/slate-docs
docker cp slate-docs:/slate/build/. docs/api/build
docker rm slate-docs
mv docs/api/build/** docs/

.PHONY: clean-docs
clean-docs: ## Clean all documentation build artifacts
bin/clean_docs.sh

.PHONY: lint
lint: ## Lint the Synse Server source code
Expand Down
29 changes: 29 additions & 0 deletions bin/clean_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

# -------------------------------------------------------
# API Documentation build artifacts (generated via Slate)
# -------------------------------------------------------

# These build artifacts should be checked in. If this script
# is run, these should be regenerated. These files are the source
# for the API Documentation hosted on GitHub pages.
if [ -d docs/stylesheets ]; then rm -rf docs/stylesheets; fi;
if [ -d docs/javascripts ]; then rm -rf docs/javascripts; fi;
if [ -d docs/images ]; then rm -rf docs/images; fi;
if [ -d docs/fonts ]; then rm -rf docs/fonts; fi;
if [ -f docs/index.html ]; then rm docs/index.html; fi;

# These build artifacts are in the .gitignore and are not checked in,
# so they are relatively safe to delete. They can be regenerated by
# running `make docs` in the repo root directory.
if [ -d docs/api/build ]; then rm -rf docs/api/build; fi;


# --------------------------------------------------------------------
# User Guide Documentation build artifacts (generated via ReadTheDocs)
# --------------------------------------------------------------------

# These build artifacts are in the .gitignore and are not checked in,
# so they are relatively safe to delete. They can be regenerated by
# running `make html` in the docs/ directory.
if [ -d docs/build ]; then rm -rf docs/build/*; fi;
Binary file added docs/fonts/slate.eot
Binary file not shown.
14 changes: 14 additions & 0 deletions docs/fonts/slate.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/fonts/slate.ttf
Binary file not shown.
Binary file added docs/fonts/slate.woff
Binary file not shown.
Binary file added docs/fonts/slate.woff2
Binary file not shown.
Binary file added docs/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/navbar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd664a5

Please sign in to comment.