Skip to content

Commit

Permalink
docs: Tweak admonition style, ensure eq. are ref'able (#2636)
Browse files Browse the repository at this point in the history
Also changes the execution of the lazy auto api generation to only run on demand (in the CI and RTD)

Blocked by:
- #2610
  • Loading branch information
paulgessinger authored Nov 14, 2023
1 parent 6352ad8 commit 534bddf
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
-W
--keep-going
-t run_doxygen
-t lazy_autodoc
-b linkcheck
. _build/html/
Expand Down
2 changes: 1 addition & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ list(APPEND sphinx_command "-b;html")
list(APPEND sphinx_command "-d;${sphinx_doctrees}")
list(APPEND sphinx_command "-j;auto")
list(APPEND sphinx_command "-W;--keep-going")
list(APPEND sphinx_command "-t;run_doxygen")
list(APPEND sphinx_command "-t;run_doxygen;-t;lazy_autodoc")

if(DEFINED ENV{CI})
list(APPEND sphinx_command "-b;linkcheck")
Expand Down
26 changes: 26 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
.wy-side-nav-search > a img.logo {
width: 200px;
}

.math {
text-align: left;
}
.eqno {
float: right;
}

.admonition.seealso .admonition-title::before {
content: ""; /* font awesome: share */
}

.admonition.caution .admonition-title::before,
.admonition.danger .admonition-title::before,
.admonition.warning .admonition-title::before {
content: ""; /* font awesome: triangle-exclamation */
}

.admonition.error .admonition-title::before {
content: ""; /* font awesome: circle-xmark */
}

.admonition.hint .admonition-title::before,
.admonition.tip .admonition-title::before {
content: ""; /* font awesome: lightbulb */
}
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

myst_enable_extensions = ["dollarmath", "colon_fence", "amsmath", "html_image"]
myst_heading_anchors = 3
myst_dmath_allow_labels = True

linkcheck_retries = 5
linkcheck_ignore = [
Expand Down Expand Up @@ -161,7 +162,8 @@
if not api_index_target.exists():
shutil.copyfile(doc_dir / "api/api_index.rst", api_index_target)
print("breathe apidoc completed")
else:

if tags.has("lazy_autodoc") or on_readthedocs:
extensions += ["lazy_autodoc"]


Expand Down

0 comments on commit 534bddf

Please sign in to comment.