Преглед на файлове

Docs: Allow to build with org and com branding

Daniel Molkentin преди 12 години
родител
ревизия
9a0096d07c
променени са 5 файла, в които са добавени 27 реда и са изтрити 4 реда
  1. 1 0
      .gitignore
  2. 3 0
      .gitmodules
  3. 19 1
      doc/CMakeLists.txt
  4. 3 3
      doc/conf.py.in
  5. 1 0
      doc/ocdoc

+ 1 - 0
.gitignore

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

+ 3 - 0
.gitmodules

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

+ 19 - 1
doc/CMakeLists.txt

@@ -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}/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} )
+				${SPHINX_HTML_DIR}/com )
     add_custom_target( doc-man  ${SPHINX_EXECUTABLE}
 	                        -q -c . -b man
 				-d ${SPHINX_CACHE_DIR}/man

+ 3 - 3
doc/conf.py.in

@@ -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 - 0
doc/ocdoc

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