diff --git a/.readthedocs.yml b/.readthedocs.yml index a89bc120..b450ec53 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -14,8 +14,8 @@ build: python: "3.9" sphinx: - configuration: docs/conf.py + configuration: website/conf.py python: install: - - requirements: docs/requirements.txt + - requirements: website/requirements.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5870e82b..ca5fb555 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,10 +73,9 @@ if (PYTHON) add_subdirectory(src/python) endif() -option(BUILD_DOCS "Set ON to build readthedocs documentation") -if (BUILD_DOCS AND NOT IMATH_IS_SUBPROJECT) - option(INSTALL_DOCS "Set ON to install html documentation" ON) - add_subdirectory(docs) +option(BUILD_WEBSITE "Set ON to build the readthedocs website source") +if (BUILD_WEBSITE AND NOT IMATH_IS_SUBPROJECT) + add_subdirectory(website) endif() # If you want to use ctest to configure, build and diff --git a/docs/CMakeLists.txt b/website/CMakeLists.txt similarity index 86% rename from docs/CMakeLists.txt rename to website/CMakeLists.txt index 799c445c..8e2c320d 100644 --- a/docs/CMakeLists.txt +++ b/website/CMakeLists.txt @@ -38,11 +38,5 @@ add_custom_command(OUTPUT ${SPHINX_INDEX_FILE} MAIN_DEPENDENCY conf.py COMMENT "Generating documentation with Sphinx") -add_custom_target(docs ALL DEPENDS ${SPHINX_INDEX_FILE} ${DOXYGEN_INDEX_FILE}) - -# Add an install target to install the docs -if(INSTALL_DOCS) - include(GNUInstallDirs) - install(DIRECTORY ${SPHINX_BUILD} - DESTINATION ${CMAKE_INSTALL_DOCDIR}) -endif() +add_custom_target(website ALL DEPENDS ${SPHINX_INDEX_FILE} ${DOXYGEN_INDEX_FILE}) + diff --git a/docs/Doxyfile.in b/website/Doxyfile.in similarity index 100% rename from docs/Doxyfile.in rename to website/Doxyfile.in diff --git a/docs/Makefile b/website/Makefile similarity index 100% rename from docs/Makefile rename to website/Makefile diff --git a/docs/PortingGuide.rst b/website/PortingGuide.rst similarity index 100% rename from docs/PortingGuide.rst rename to website/PortingGuide.rst diff --git a/docs/PortingGuide2-3.md b/website/PortingGuide2-3.md similarity index 100% rename from docs/PortingGuide2-3.md rename to website/PortingGuide2-3.md diff --git a/docs/SymbolVisibility.rst b/website/SymbolVisibility.rst similarity index 100% rename from docs/SymbolVisibility.rst rename to website/SymbolVisibility.rst diff --git a/docs/about.rst b/website/about.rst similarity index 100% rename from docs/about.rst rename to website/about.rst diff --git a/docs/classes.rst b/website/classes.rst similarity index 100% rename from docs/classes.rst rename to website/classes.rst diff --git a/docs/classes/Box.rst b/website/classes/Box.rst similarity index 100% rename from docs/classes/Box.rst rename to website/classes/Box.rst diff --git a/docs/classes/Color3.rst b/website/classes/Color3.rst similarity index 100% rename from docs/classes/Color3.rst rename to website/classes/Color3.rst diff --git a/docs/classes/Color4.rst b/website/classes/Color4.rst similarity index 100% rename from docs/classes/Color4.rst rename to website/classes/Color4.rst diff --git a/docs/classes/Euler.rst b/website/classes/Euler.rst similarity index 100% rename from docs/classes/Euler.rst rename to website/classes/Euler.rst diff --git a/docs/classes/Frustum.rst b/website/classes/Frustum.rst similarity index 100% rename from docs/classes/Frustum.rst rename to website/classes/Frustum.rst diff --git a/docs/classes/Interval.rst b/website/classes/Interval.rst similarity index 100% rename from docs/classes/Interval.rst rename to website/classes/Interval.rst diff --git a/docs/classes/Line3.rst b/website/classes/Line3.rst similarity index 100% rename from docs/classes/Line3.rst rename to website/classes/Line3.rst diff --git a/docs/classes/Matrix22.rst b/website/classes/Matrix22.rst similarity index 100% rename from docs/classes/Matrix22.rst rename to website/classes/Matrix22.rst diff --git a/docs/classes/Matrix33.rst b/website/classes/Matrix33.rst similarity index 100% rename from docs/classes/Matrix33.rst rename to website/classes/Matrix33.rst diff --git a/docs/classes/Matrix44.rst b/website/classes/Matrix44.rst similarity index 100% rename from docs/classes/Matrix44.rst rename to website/classes/Matrix44.rst diff --git a/docs/classes/Plane3.rst b/website/classes/Plane3.rst similarity index 100% rename from docs/classes/Plane3.rst rename to website/classes/Plane3.rst diff --git a/docs/classes/Quat.rst b/website/classes/Quat.rst similarity index 100% rename from docs/classes/Quat.rst rename to website/classes/Quat.rst diff --git a/docs/classes/Rand32.rst b/website/classes/Rand32.rst similarity index 100% rename from docs/classes/Rand32.rst rename to website/classes/Rand32.rst diff --git a/docs/classes/Rand48.rst b/website/classes/Rand48.rst similarity index 100% rename from docs/classes/Rand48.rst rename to website/classes/Rand48.rst diff --git a/docs/classes/Shear6.rst b/website/classes/Shear6.rst similarity index 100% rename from docs/classes/Shear6.rst rename to website/classes/Shear6.rst diff --git a/docs/classes/Sphere3.rst b/website/classes/Sphere3.rst similarity index 100% rename from docs/classes/Sphere3.rst rename to website/classes/Sphere3.rst diff --git a/docs/classes/Vec2.rst b/website/classes/Vec2.rst similarity index 100% rename from docs/classes/Vec2.rst rename to website/classes/Vec2.rst diff --git a/docs/classes/Vec3.rst b/website/classes/Vec3.rst similarity index 100% rename from docs/classes/Vec3.rst rename to website/classes/Vec3.rst diff --git a/docs/classes/Vec4.rst b/website/classes/Vec4.rst similarity index 100% rename from docs/classes/Vec4.rst rename to website/classes/Vec4.rst diff --git a/docs/classes/float.rst b/website/classes/float.rst similarity index 100% rename from docs/classes/float.rst rename to website/classes/float.rst diff --git a/docs/classes/half.rst b/website/classes/half.rst similarity index 100% rename from docs/classes/half.rst rename to website/classes/half.rst diff --git a/docs/classes/half_c.rst b/website/classes/half_c.rst similarity index 100% rename from docs/classes/half_c.rst rename to website/classes/half_c.rst diff --git a/docs/classes/half_class.rst b/website/classes/half_class.rst similarity index 100% rename from docs/classes/half_class.rst rename to website/classes/half_class.rst diff --git a/docs/classes/half_conversion.rst b/website/classes/half_conversion.rst similarity index 100% rename from docs/classes/half_conversion.rst rename to website/classes/half_conversion.rst diff --git a/docs/classes/half_limits.rst b/website/classes/half_limits.rst similarity index 100% rename from docs/classes/half_limits.rst rename to website/classes/half_limits.rst diff --git a/docs/concepts.rst b/website/concepts.rst similarity index 100% rename from docs/concepts.rst rename to website/concepts.rst diff --git a/docs/conf.py b/website/conf.py similarity index 100% rename from docs/conf.py rename to website/conf.py diff --git a/docs/examples/Box.cpp b/website/examples/Box.cpp similarity index 100% rename from docs/examples/Box.cpp rename to website/examples/Box.cpp diff --git a/docs/examples/CMakeLists.txt b/website/examples/CMakeLists.txt similarity index 100% rename from docs/examples/CMakeLists.txt rename to website/examples/CMakeLists.txt diff --git a/docs/examples/Color3.cpp b/website/examples/Color3.cpp similarity index 100% rename from docs/examples/Color3.cpp rename to website/examples/Color3.cpp diff --git a/docs/examples/Color4.cpp b/website/examples/Color4.cpp similarity index 100% rename from docs/examples/Color4.cpp rename to website/examples/Color4.cpp diff --git a/docs/examples/Euler.cpp b/website/examples/Euler.cpp similarity index 100% rename from docs/examples/Euler.cpp rename to website/examples/Euler.cpp diff --git a/docs/examples/Frustum.cpp b/website/examples/Frustum.cpp similarity index 100% rename from docs/examples/Frustum.cpp rename to website/examples/Frustum.cpp diff --git a/docs/examples/Interval.cpp b/website/examples/Interval.cpp similarity index 100% rename from docs/examples/Interval.cpp rename to website/examples/Interval.cpp diff --git a/docs/examples/Line3.cpp b/website/examples/Line3.cpp similarity index 100% rename from docs/examples/Line3.cpp rename to website/examples/Line3.cpp diff --git a/docs/examples/Matrix22.cpp b/website/examples/Matrix22.cpp similarity index 100% rename from docs/examples/Matrix22.cpp rename to website/examples/Matrix22.cpp diff --git a/docs/examples/Matrix33.cpp b/website/examples/Matrix33.cpp similarity index 100% rename from docs/examples/Matrix33.cpp rename to website/examples/Matrix33.cpp diff --git a/docs/examples/Matrix44.cpp b/website/examples/Matrix44.cpp similarity index 100% rename from docs/examples/Matrix44.cpp rename to website/examples/Matrix44.cpp diff --git a/docs/examples/Plane3.cpp b/website/examples/Plane3.cpp similarity index 100% rename from docs/examples/Plane3.cpp rename to website/examples/Plane3.cpp diff --git a/docs/examples/Quat.cpp b/website/examples/Quat.cpp similarity index 100% rename from docs/examples/Quat.cpp rename to website/examples/Quat.cpp diff --git a/docs/examples/Shear6.cpp b/website/examples/Shear6.cpp similarity index 100% rename from docs/examples/Shear6.cpp rename to website/examples/Shear6.cpp diff --git a/docs/examples/Sphere3.cpp b/website/examples/Sphere3.cpp similarity index 100% rename from docs/examples/Sphere3.cpp rename to website/examples/Sphere3.cpp diff --git a/docs/examples/Vec2.cpp b/website/examples/Vec2.cpp similarity index 100% rename from docs/examples/Vec2.cpp rename to website/examples/Vec2.cpp diff --git a/docs/examples/Vec3.cpp b/website/examples/Vec3.cpp similarity index 100% rename from docs/examples/Vec3.cpp rename to website/examples/Vec3.cpp diff --git a/docs/examples/Vec4.cpp b/website/examples/Vec4.cpp similarity index 100% rename from docs/examples/Vec4.cpp rename to website/examples/Vec4.cpp diff --git a/docs/examples/gl.cpp b/website/examples/gl.cpp similarity index 100% rename from docs/examples/gl.cpp rename to website/examples/gl.cpp diff --git a/docs/examples/half.c b/website/examples/half.c similarity index 100% rename from docs/examples/half.c rename to website/examples/half.c diff --git a/docs/examples/half.cpp b/website/examples/half.cpp similarity index 100% rename from docs/examples/half.cpp rename to website/examples/half.cpp diff --git a/docs/examples/intro.cpp b/website/examples/intro.cpp similarity index 100% rename from docs/examples/intro.cpp rename to website/examples/intro.cpp diff --git a/docs/examples/main.cpp b/website/examples/main.cpp similarity index 100% rename from docs/examples/main.cpp rename to website/examples/main.cpp diff --git a/docs/fixmanpages.sh b/website/fixmanpages.sh similarity index 100% rename from docs/fixmanpages.sh rename to website/fixmanpages.sh diff --git a/docs/functions.rst b/website/functions.rst similarity index 100% rename from docs/functions.rst rename to website/functions.rst diff --git a/docs/functions/box.rst b/website/functions/box.rst similarity index 100% rename from docs/functions/box.rst rename to website/functions/box.rst diff --git a/docs/functions/color.rst b/website/functions/color.rst similarity index 100% rename from docs/functions/color.rst rename to website/functions/color.rst diff --git a/docs/functions/frame.rst b/website/functions/frame.rst similarity index 100% rename from docs/functions/frame.rst rename to website/functions/frame.rst diff --git a/docs/functions/gl.rst b/website/functions/gl.rst similarity index 100% rename from docs/functions/gl.rst rename to website/functions/gl.rst diff --git a/docs/functions/glu.rst b/website/functions/glu.rst similarity index 100% rename from docs/functions/glu.rst rename to website/functions/glu.rst diff --git a/docs/functions/line.rst b/website/functions/line.rst similarity index 100% rename from docs/functions/line.rst rename to website/functions/line.rst diff --git a/docs/functions/matrix.rst b/website/functions/matrix.rst similarity index 100% rename from docs/functions/matrix.rst rename to website/functions/matrix.rst diff --git a/docs/functions/random.rst b/website/functions/random.rst similarity index 100% rename from docs/functions/random.rst rename to website/functions/random.rst diff --git a/docs/functions/roots.rst b/website/functions/roots.rst similarity index 100% rename from docs/functions/roots.rst rename to website/functions/roots.rst diff --git a/docs/functions/vec.rst b/website/functions/vec.rst similarity index 100% rename from docs/functions/vec.rst rename to website/functions/vec.rst diff --git a/docs/images/imath-fav.ico b/website/images/imath-fav.ico similarity index 100% rename from docs/images/imath-fav.ico rename to website/images/imath-fav.ico diff --git a/docs/images/imath-logo-black.png b/website/images/imath-logo-black.png similarity index 100% rename from docs/images/imath-logo-black.png rename to website/images/imath-logo-black.png diff --git a/docs/images/imath-logo-blue.png b/website/images/imath-logo-blue.png similarity index 100% rename from docs/images/imath-logo-blue.png rename to website/images/imath-logo-blue.png diff --git a/docs/images/imath-logo-white.png b/website/images/imath-logo-white.png similarity index 100% rename from docs/images/imath-logo-white.png rename to website/images/imath-logo-white.png diff --git a/docs/index.rst b/website/index.rst similarity index 100% rename from docs/index.rst rename to website/index.rst diff --git a/docs/install.rst b/website/install.rst similarity index 95% rename from docs/install.rst rename to website/install.rst index 120153c0..415be040 100644 --- a/docs/install.rst +++ b/website/install.rst @@ -141,8 +141,8 @@ See the :doc:`PortingGuide` for details about differences from previous releases and how to address them. Also refer to the porting guide for details about changes to Imath. -Building the Documentation --------------------------- +Building the Website +-------------------- The Imath technical documentation at `https://imath.readthedocs.io `_ is generated via `Sphinx @@ -150,18 +150,26 @@ The Imath technical documentation at `https://imath.readthedocs.io `_ extension using information extracted from header comments by `Doxygen `_. -To build the documentation locally from the source headers and -``.rst`` files, set the CMake option ``BUILD_DOCS=ON``. This adds -``Doxygen`` and ``Sphinx`` CMake targets and enables building the docs -by default. generation is off by default. +To build the website locally from the source headers and +``.rst`` files, set the CMake option ``BUILD_WEBSITE=ON``. This adds +``Doxygen`` and ``Sphinx`` CMake targets. Generation is off by default. -Building the documentation requires that ``sphinx``, ``breathe``, and +Building the website requires that ``sphinx``, ``breathe``, and ``doxygen`` are installed. It further requires the `sphinx-press-theme `_, as indicated in the `requirements.txt `_ file. +On Debian/Ubuntu Linux: + +.. code-block:: + + % apt-get install doxygen python3-sphinx + % pip3 install breathe + % pip install sphinx_press_theme + + CMake Build-time Configuration Options -------------------------------------- diff --git a/docs/license.rst b/website/license.rst similarity index 100% rename from docs/license.rst rename to website/license.rst diff --git a/docs/requirements.txt b/website/requirements.txt similarity index 100% rename from docs/requirements.txt rename to website/requirements.txt diff --git a/docs/toc_redirect.rst b/website/toc_redirect.rst similarity index 100% rename from docs/toc_redirect.rst rename to website/toc_redirect.rst