Skip to content

Commit 05520dd

Browse files
committed
Add code block syntax highlighting to SPRAG docs
1 parent bbae73b commit 05520dd

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

docs/app/shell.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,12 @@ details[open] > .sidebar-section-header::after {
950950
border: none;
951951
}
952952

953+
.prose pre code.hljs {
954+
overflow: visible;
955+
padding: 0;
956+
background: transparent;
957+
}
958+
953959
.prose blockquote {
954960
margin: 1.25rem 0;
955961
padding: 0.85rem 1.15rem;

docs/app/shell.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,11 @@
2121
<main class="page">
2222
{{ sprag_slot }}
2323
</main>
24+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css">
25+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
26+
<script>
27+
if (window.hljs) {
28+
window.hljs.highlightAll();
29+
}
30+
</script>
2431
</div>

0 commit comments

Comments
 (0)