Docs: Allow to build with org and com branding

This commit is contained in:
Daniel Molkentin 2013-09-02 14:01:15 +02:00
parent 25d33d6057
commit 9a0096d07c
5 changed files with 27 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.gitmodules
*build*/
*flymake*
CMakeLists.txt.user*

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "doc/ocdoc"]
path = doc/ocdoc
url = https://github.com/owncloud/documentation

View File

@ -22,6 +22,11 @@ if(SPHINX_FOUND)
add_custom_target(doc DEPENDS doc-html doc-man COMMENT "Building documentation...")
endif(WITH_DOC)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ocdoc")
add_dependencies(doc doc-html-org)
add_dependencies(doc doc-html-com)
endif()
if(PDFLATEX_FOUND)
# if this still fails on Debian/Ubuntu, run
# apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
@ -55,8 +60,21 @@ if(SPHINX_FOUND)
add_custom_target( doc-html ${SPHINX_EXECUTABLE}
-q -c . -b html
-d ${SPHINX_CACHE_DIR}/html
-D html_theme=owncloud_org
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR} )
${SPHINX_HTML_DIR}/unthemed )
add_custom_target( doc-html-org ${SPHINX_EXECUTABLE}
-q -c . -b html
-d ${SPHINX_CACHE_DIR}/html
-D html_theme=owncloud_org
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR}/org )
add_custom_target( doc-html-com ${SPHINX_EXECUTABLE}
-q -c . -b html
-d ${SPHINX_CACHE_DIR}/html
-D html_theme=owncloud_com
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR}/com )
add_custom_target( doc-man ${SPHINX_EXECUTABLE}
-q -c . -b man
-d ${SPHINX_CACHE_DIR}/man

View File

@ -28,7 +28,7 @@ import sys, os
extensions = ['sphinx.ext.todo']
# Add any paths that contain templates here, relative to this directory.
#templates_path = ['templates']
templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/templates']
# The suffix of source filenames.
source_suffix = '.rst'
@ -95,7 +95,7 @@ pygments_style = 'sphinx'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = ['themes']
html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/themes']
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
@ -120,7 +120,7 @@ html_short_title = "Client Manual"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['static']
html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/ocdoc/_shared_assets/static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.

1
doc/ocdoc Submodule

@ -0,0 +1 @@
Subproject commit 2c3e584b2356dc4324e6e0720b7aa908aaa480a3