Skip to content

Commit d4e517e

Browse files
committed
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 <[email protected]>
1 parent d2b9ff6 commit d4e517e

File tree

6 files changed

+33
-3
lines changed

6 files changed

+33
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@ if(WITH_DOC)
434434
DESTINATION ${CMAKE_HTML_DEST_DIR}/${CMAKE_API_DEST_DIR}
435435
FILES_MATCHING PATTERN "*.svg")
436436
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/doc/html/ DESTINATION ${CMAKE_HTML_DEST_DIR})
437+
configure_file(
438+
${CMAKE_CURRENT_SOURCE_DIR}/doc/index.html.in
439+
${CMAKE_HTML_DEST_DIR}/index.html @ONLY)
437440

438441
add_custom_command(TARGET iio POST_BUILD
439442
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile

Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ HTML_HEADER =
930930
# that doxygen normally uses.
931931
# This tag requires that the tag GENERATE_HTML is set to YES.
932932

933-
HTML_FOOTER =
933+
HTML_FOOTER = @CMAKE_SOURCE_DIR@/doc/template/footer.html
934934

935935
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
936936
# sheet that is used by each HTML page. It can be used to fine-tune the look of

bindings/csharp/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ HTML_HEADER =
930930
# that doxygen normally uses.
931931
# This tag requires that the tag GENERATE_HTML is set to YES.
932932

933-
HTML_FOOTER =
933+
HTML_FOOTER = @CMAKE_SOURCE_DIR@/doc/template/footer.html
934934

935935
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
936936
# sheet that is used by each HTML page. It can be used to fine-tune the look of

doc/html/img/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ h3{
2727
}
2828
header{
2929
margin-bottom: 20px;
30+
display: table;
3031
}
3132
header img{
3233
margin-top: 10px;
3334
margin-bottom: 0px;
35+
margin-right: 10px;
36+
float: left;
3437
height: 75px;
3538
vertical-align: middle
3639
}

doc/html/index.html renamed to doc/index.html.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
<!-- Add your site or application content here -->
2020
<header id="top">
2121
<a href="http://analogdevicesinc.github.io/libiio/"><img src=
22-
"img/iio_logo.png" alt="IIO logo"></a> <strong>A cross-platform user
22+
"img/iio_logo.png" alt="IIO logo"></a> <br> <strong>A cross-platform user
2323
library to access Industrial Input Output (IIO) devices</strong>
24+
<br>Version @LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@-g@LIBIIO_VERSION_GIT@
2425
</header>
2526
<nav class="buttons">
2627
<a class="button" href=

doc/template/footer.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!-- HTML footer for doxygen 1.8.13-->
2+
<!-- start footer part -->
3+
<!--BEGIN GENERATE_TREEVIEW-->
4+
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
5+
<ul>
6+
$navpath
7+
<li class="footer">
8+
Copyright <a href="https://github.com/analogdevicesinc/libiio/blob/master/Contributors.md">libIIO Contributors</a>
9+
<a href="http://www.doxygen.org/index.html">
10+
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
11+
</ul>
12+
</div>
13+
<!--END GENERATE_TREEVIEW-->
14+
<!--BEGIN !GENERATE_TREEVIEW-->
15+
<hr class="footer"/><address class="footer"><small>
16+
Copyright <a href="https://github.com/analogdevicesinc/libiio/blob/master/Contributors.md">libIIO Contributors</a>
17+
&#160;<a href="http://www.doxygen.org/index.html">
18+
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
19+
</a> $doxygenversion
20+
</small></address>
21+
<!--END !GENERATE_TREEVIEW-->
22+
</body>
23+
</html>

0 commit comments

Comments
 (0)