Skip to content

Commit 00be018

Browse files
authored
Fix doc-rs build (#141)
Seems like the doc-rs build of the swiftnav-v0.11.0 tag failed because we setup the doc-rs meta data incorrectly. This PR adds a CI step to test the doc-rs build, and fixes the failure.
1 parent dc1dc72 commit 00be018

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ jobs:
3939
- name: Docs
4040
run: just docs
4141

42+
doc-rs:
43+
name: docs-rs test
44+
runs-on: ubuntu-latest
45+
env:
46+
RUSTDOCFLAGS: -Dwarnings
47+
steps:
48+
- uses: actions/checkout@v5
49+
- uses: dtolnay/rust-toolchain@nightly
50+
- uses: dtolnay/install@cargo-docs-rs
51+
- run: cargo docs-rs -p swiftnav
52+
4253
build:
4354
name: Build and test
4455
runs-on: ${{ matrix.os }}

katex-header.html

Lines changed: 0 additions & 15 deletions
This file was deleted.

katex-header.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
swiftnav/katex-header.html

swiftnav/katex-header.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.css" integrity="sha256-GQlRJzV+1tKf4KY6awAMkTqJ9/GWO3Zd03Fel8mFLnU=" crossorigin="anonymous">
2+
<script src="https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.js" integrity="sha256-6NiFUFlJ86X0q91d0NU2lr0Tca0m/79PMQ3Nd8jNrok=" crossorigin="anonymous"></script>
3+
<script src="https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/contrib/auto-render.min.js" integrity="sha256-u1PrlTOUUxquNv3VNwZcQkTrhUKQGjzpFGAdkyZ1uKw=" crossorigin="anonymous"></script>
4+
<script>
5+
document.addEventListener("DOMContentLoaded", function() {
6+
renderMathInElement(document.body, {
7+
delimiters: [
8+
{left: "$$", right: "$$", display: true},
9+
{left: "\\(", right: "\\)", display: false},
10+
{left: "$", right: "$", display: false},
11+
{left: "\\[", right: "\\]", display: true}
12+
]
13+
});
14+
});
15+
</script>

0 commit comments

Comments
 (0)