From 981d542177f61a304e437dfc5e4f693f693423d6 Mon Sep 17 00:00:00 2001 From: Bailey Cosier Date: Thu, 21 Sep 2017 18:12:58 +0700 Subject: [PATCH] Add doc scripts and sphinx configuration update --- .gitignore | 1 + .gitmodules | 3 +++ docs/build/html | 1 + docs/make_docs.sh | 20 ++++++++++++++++++++ docs/release_docs.sh | 15 +++++++++++++++ docs/setup_docs.sh | 17 +++++++++++++++++ docs/source/conf.py | 1 + 7 files changed, 58 insertions(+) create mode 100644 .gitmodules create mode 160000 docs/build/html create mode 100755 docs/make_docs.sh create mode 100755 docs/release_docs.sh create mode 100755 docs/setup_docs.sh diff --git a/.gitignore b/.gitignore index d812505..f22a5d6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ demo/*/*.exe demo/*/*.obj docs/xml docs/build +docs/src *.tmp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..33d3a20 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs/build/html"] + path = docs/build/html + url = https://github.com/nuklear-ui/nuklear-ui.github.io diff --git a/docs/build/html b/docs/build/html new file mode 160000 index 0000000..c4f62b8 --- /dev/null +++ b/docs/build/html @@ -0,0 +1 @@ +Subproject commit c4f62b837d785dcf1c43859cb9adde9922c9b4c7 diff --git a/docs/make_docs.sh b/docs/make_docs.sh new file mode 100755 index 0000000..916cb84 --- /dev/null +++ b/docs/make_docs.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Safety first +set -euf -o pipefail + +# Determine the docs root directory +DOCS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +cd $DOCS_DIR + +# Run doxygen to generate xml output +doxygen + +# Generate html output via sphinx +make html + + + + + diff --git a/docs/release_docs.sh b/docs/release_docs.sh new file mode 100755 index 0000000..1ae5937 --- /dev/null +++ b/docs/release_docs.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Safety first +set -euf -o pipefail + +# Determine the docs root directory +DOCS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +cd $DOCS_DIR/build/html +git commit -am '[auto] updating static documentation' +git push origin master + + + + diff --git a/docs/setup_docs.sh b/docs/setup_docs.sh new file mode 100755 index 0000000..1612fe4 --- /dev/null +++ b/docs/setup_docs.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Dependencies required to generate documentation + +if [[ "$(which pip)" == "" ]]; then + echo "Could not find pip, please python pip from your repos" + exit 1 +fi + +if [[ "$(which doxygen)" == "" ]]; then + echo "Could not find doxygen, please doxygen from your repos" + exit 1 +fi + +pip install sphinx +pip install breathe +pip install -e git+git://github.com/nuklear-ui/sphinx-to-github.git#egg=sphinx-to-github diff --git a/docs/source/conf.py b/docs/source/conf.py index 4fff3ef..9ef2e6c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -37,6 +37,7 @@ extensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', + 'sphinxtogithub', 'breathe']