@@ -113,6 +113,9 @@ $doctype 5
113
113
$forall OpenGraph { ogTag, ogContent } <- docsOpenGraph $ target pkg
114
114
<meta property="#{ogTag}" content="#{ogContent}">
115
115
<link rel="stylesheet" href="#{root}style.css">
116
+ <link rel="stylesheet" href="#{hljsCss}">
117
+ <script src="#{hljsJs}"></script>
118
+ <script>hljs.initHighlightingOnLoad();</script>
116
119
<body>
117
120
#{preEscapedToMarkup $ docsHeader $ target pkg}
118
121
<nav>
@@ -169,6 +172,12 @@ $doctype 5
169
172
documentSortKey (" " , _) = (False , 0 , " " )
170
173
documentSortKey (fp@ (fp1 : _), _) =
171
174
(isUpper fp1, length (filter (== pathSeparator) fp), fp)
175
+ hljsBase :: T. Text
176
+ hljsBase = " https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/"
177
+ hljsCss :: T. Text
178
+ hljsCss = T. concat [hljsBase, " styles/github.min.css" ]
179
+ hljsJs :: T. Text
180
+ hljsJs = T. concat [hljsBase, " highlight.min.js" ]
172
181
173
182
typeExpression :: BoundModule Docs -> TE. TypeExpression -> Html
174
183
typeExpression _ expr = [shamlet |#{typeExpr expr}|]
@@ -498,7 +507,7 @@ strong code
498
507
pre
499
508
padding: 16px 10px
500
509
background-color: #{gray1}
501
- code
510
+ code, code.hljs
502
511
background: none
503
512
div
504
513
border-top: 1px solid #{gray3}
0 commit comments