Skip to content

Commit

Permalink
Rename "docs" to "website"
Browse files Browse the repository at this point in the history
"website" is a more accurate term than "docs", so:

- The source lives in the ``website`` subdirectory (was ``docs``)
- The CMake option is now ``BUILD_WEBSITE`` (was ``BUILD_DOCS``)
- The CMake target is now ``website`` (was ``docs``)
- There's no longer a CMake option to install the docs, since copying
  the ``.html`` to the install location is pointless. The ``INSTALL_DOCS``
  option has been removed.

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm committed Jul 29, 2023
1 parent d40cc38 commit 36ae918
Show file tree
Hide file tree
Showing 81 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 2 additions & 8 deletions docs/CMakeLists.txt → website/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
22 changes: 15 additions & 7 deletions docs/install.rst → website/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,27 +141,35 @@ 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
<https://imath.readthedocs.io>`_ is generated via `Sphinx
<https://www.sphinx-doc.org>`_ with the `Breathe
<https://breathe.readthedocs.io>`_ extension using information
extracted from header comments by `Doxygen <https://www.doxygen.nl>`_.

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
<https://pypi.org/project/sphinx-press-theme>`_, as indicated in the
`requirements.txt
<https://github.com/AcademySoftwareFoundation/imath/blob/main/docs/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
--------------------------------------

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 36ae918

Please sign in to comment.