Browse Source

Add doc scripts and sphinx configuration update

Bailey Cosier 8 years ago
parent
commit
981d542177
7 changed files with 58 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 3 0
      .gitmodules
  3. 1 0
      docs/build/html
  4. 20 0
      docs/make_docs.sh
  5. 15 0
      docs/release_docs.sh
  6. 17 0
      docs/setup_docs.sh
  7. 1 0
      docs/source/conf.py

+ 1 - 0
.gitignore

@@ -2,4 +2,5 @@ demo/*/*.exe
 demo/*/*.obj
 docs/xml
 docs/build
+docs/src
 *.tmp

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "docs/build/html"]
+	path = docs/build/html
+	url = https://github.com/nuklear-ui/nuklear-ui.github.io

+ 1 - 0
docs/build/html

@@ -0,0 +1 @@
+Subproject commit c4f62b837d785dcf1c43859cb9adde9922c9b4c7

+ 20 - 0
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
+
+
+
+
+

+ 15 - 0
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
+
+
+
+

+ 17 - 0
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

+ 1 - 0
docs/source/conf.py

@@ -37,6 +37,7 @@ extensions = ['sphinx.ext.todo',
     'sphinx.ext.mathjax',
     'sphinx.ext.ifconfig',
     'sphinx.ext.viewcode',
+    'sphinxtogithub',
     'breathe']