Skip to content

Commit

Permalink
html: tweak html output to keep track of versions easier.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rgetz committed May 14, 2020
1 parent d2b9ff6 commit d4e517e
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bindings/csharp/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions doc/html/img/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion doc/html/index.html → doc/index.html.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
<!-- Add your site or application content here -->
<header id="top">
<a href="http://analogdevicesinc.github.io/libiio/"><img src=
"img/iio_logo.png" alt="IIO logo"></a> <strong>A cross-platform user
"img/iio_logo.png" alt="IIO logo"></a> <br> <strong>A cross-platform user
library to access Industrial Input Output (IIO) devices</strong>
<br>Version @LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@-g@LIBIIO_VERSION_GIT@
</header>
<nav class="buttons">
<a class="button" href=
Expand Down
23 changes: 23 additions & 0 deletions doc/template/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">
Copyright <a href="https://github.com/analogdevicesinc/libiio/blob/master/Contributors.md">libIIO Contributors</a>
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
Copyright <a href="https://github.com/analogdevicesinc/libiio/blob/master/Contributors.md">libIIO Contributors</a>
&#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>

0 comments on commit d4e517e

Please sign in to comment.