From d4e517ea647fe0df75df2db7352e7a583a86b126 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Thu, 14 May 2020 01:31:14 -0400 Subject: [PATCH] html: tweak html output to keep track of versions easier. Add git version to main page. This requires: - moving doc/html/index.html -> doc/index.html.in - adding cmake vars to new doc/index.html.in - tweaking the css, so it prints out on two lines properly - processing it in the cmake file Don't include date in footers, which helps with tracking changes (don't see doc changes just because you create new doc). This requires a custom footer, so add a footer template, and use it in the existing Doxyfile.in files. Signed-off-by: Robin Getz --- CMakeLists.txt | 3 +++ Doxyfile.in | 2 +- bindings/csharp/Doxyfile.in | 2 +- doc/html/img/style.css | 3 +++ doc/{html/index.html => index.html.in} | 3 ++- doc/template/footer.html | 23 +++++++++++++++++++++++ 6 files changed, 33 insertions(+), 3 deletions(-) rename doc/{html/index.html => index.html.in} (99%) create mode 100644 doc/template/footer.html diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bb19e6b6..297128633 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -434,6 +434,9 @@ if(WITH_DOC) DESTINATION ${CMAKE_HTML_DEST_DIR}/${CMAKE_API_DEST_DIR} FILES_MATCHING PATTERN "*.svg") file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc/html/ DESTINATION ${CMAKE_HTML_DEST_DIR}) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/doc/index.html.in + ${CMAKE_HTML_DEST_DIR}/index.html @ONLY) add_custom_command(TARGET iio POST_BUILD COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile diff --git a/Doxyfile.in b/Doxyfile.in index f053f8b5e..c3c9f72dd 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -930,7 +930,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = @CMAKE_SOURCE_DIR@/doc/template/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of diff --git a/bindings/csharp/Doxyfile.in b/bindings/csharp/Doxyfile.in index 07585db2d..e1252a680 100644 --- a/bindings/csharp/Doxyfile.in +++ b/bindings/csharp/Doxyfile.in @@ -930,7 +930,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = @CMAKE_SOURCE_DIR@/doc/template/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of diff --git a/doc/html/img/style.css b/doc/html/img/style.css index 7696a31c6..c87609072 100644 --- a/doc/html/img/style.css +++ b/doc/html/img/style.css @@ -27,10 +27,13 @@ h3{ } header{ margin-bottom: 20px; + display: table; } header img{ margin-top: 10px; margin-bottom: 0px; + margin-right: 10px; + float: left; height: 75px; vertical-align: middle } diff --git a/doc/html/index.html b/doc/index.html.in similarity index 99% rename from doc/html/index.html rename to doc/index.html.in index 179da299c..d2a77c7cc 100644 --- a/doc/html/index.html +++ b/doc/index.html.in @@ -19,8 +19,9 @@
IIO logo A cross-platform user + "img/iio_logo.png" alt="IIO logo">
A cross-platform user library to access Industrial Input Output (IIO) devices +
Version @LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@-g@LIBIIO_VERSION_GIT@