From a8fbee73140fe06e5fc3ef79f1d316bef7103636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rimas=20Misevi=C4=8Dius?= Date: Thu, 26 Oct 2023 17:52:43 +0300 Subject: [PATCH 1/3] Add Doxygen Awesome CSS theme More info: https://jothepro.github.io/doxygen-awesome-css/ --- .github/workflows/documentation.yml | 2 ++ .gitignore | 1 + Doxyfile | 4 ++-- doc/download-theme.sh | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 doc/download-theme.sh diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 167c44da..6308bf7d 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -15,6 +15,8 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} steps: - uses: actions/checkout@v4 + - name: Download theme + run: doc/download-theme.sh - uses: mattnotmitt/doxygen-action@edge - name: Deploy uses: peaceiris/actions-gh-pages@v3 diff --git a/.gitignore b/.gitignore index 1aeac7b5..f83adeee 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ # generated documentation /doc/html/ +/doc/theme/ # downloadable tests directory /test/wpt/ diff --git a/Doxyfile b/Doxyfile index ec1d2c01..b0188002 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1402,7 +1402,7 @@ HTML_STYLESHEET = # documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = doc/theme/doxygen-awesome.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1425,7 +1425,7 @@ HTML_EXTRA_FILES = # The default value is: AUTO_LIGHT. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_COLORSTYLE = AUTO_LIGHT +HTML_COLORSTYLE = LIGHT # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to diff --git a/doc/download-theme.sh b/doc/download-theme.sh new file mode 100755 index 00000000..a7bd4fd0 --- /dev/null +++ b/doc/download-theme.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# the directory path of this file +# https://stackoverflow.com/q/59895 +p="$(dirname "$0")" + +# The version of Doxygen Awesome theme to download from +# https://github.com/jothepro/doxygen-awesome-css +VERSION=v2.2.1 + +mkdir -p ${p}/theme + +for f in doxygen-awesome.css +do + curl -fsS -o ${p}/theme/${f} https://raw.githubusercontent.com/jothepro/doxygen-awesome-css/${VERSION}/${f} +done From 24d7bbd4354f5c9b5f5287bf04a087cae3b663d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rimas=20Misevi=C4=8Dius?= Date: Thu, 26 Oct 2023 19:56:03 +0300 Subject: [PATCH 2/3] Create default doxygen header.html template Using command: doxygen -w html header.html delete_me.html delete_me.css More info: https://jothepro.github.io/doxygen-awesome-css/md_docs_2extensions.html --- Doxyfile | 2 +- doc/header.html | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 doc/header.html diff --git a/Doxyfile b/Doxyfile index b0188002..a8f99252 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1362,7 +1362,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = doc/header.html # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard diff --git a/doc/header.html b/doc/header.html new file mode 100644 index 00000000..65a81128 --- /dev/null +++ b/doc/header.html @@ -0,0 +1,74 @@ + + + + + + + + +$projectname: $title +$title + + + + + + + + +$treeview +$search +$mathjax +$darkmode + +$extrastylesheet + + + + +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
$projectname $projectnumber +
+
$projectbrief
+
+
$projectbrief
+
$searchbox
$searchbox
+
+ + From d4e9af4bb4dcc70510ccc865717201f6be67f21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rimas=20Misevi=C4=8Dius?= Date: Thu, 26 Oct 2023 20:48:04 +0300 Subject: [PATCH 3/3] Add Doxygen Avesome Extensions * Dark Mode Toggle * Fragment Copy Button * Paragraph Linking More info: https://jothepro.github.io/doxygen-awesome-css/md_docs_2extensions.html --- Doxyfile | 4 +++- doc/download-theme.sh | 5 ++++- doc/header.html | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Doxyfile b/Doxyfile index a8f99252..277f5390 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1412,7 +1412,9 @@ HTML_EXTRA_STYLESHEET = doc/theme/doxygen-awesome.css # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = doc/theme/doxygen-awesome-darkmode-toggle.js \ + doc/theme/doxygen-awesome-fragment-copy-button.js \ + doc/theme/doxygen-awesome-paragraph-link.js # The HTML_COLORSTYLE tag can be used to specify if the generated HTML output # should be rendered with a dark or light theme. diff --git a/doc/download-theme.sh b/doc/download-theme.sh index a7bd4fd0..d6cf0bba 100755 --- a/doc/download-theme.sh +++ b/doc/download-theme.sh @@ -10,7 +10,10 @@ VERSION=v2.2.1 mkdir -p ${p}/theme -for f in doxygen-awesome.css +for f in doxygen-awesome.css \ + doxygen-awesome-darkmode-toggle.js \ + doxygen-awesome-fragment-copy-button.js \ + doxygen-awesome-paragraph-link.js do curl -fsS -o ${p}/theme/${f} https://raw.githubusercontent.com/jothepro/doxygen-awesome-css/${VERSION}/${f} done diff --git a/doc/header.html b/doc/header.html index 65a81128..666e6ece 100644 --- a/doc/header.html +++ b/doc/header.html @@ -20,6 +20,14 @@ $search $mathjax $darkmode + + + + $extrastylesheet