@@ -23,6 +23,7 @@ import laika.config.Config
23
23
import laika .io .model .InputTree
24
24
import laika .markdown .github .GitHubFlavor
25
25
import laika .parse .code .SyntaxHighlighting
26
+ import laika .parse .code .languages .DottySyntax
26
27
import laika .rewrite .DefaultTemplatePath
27
28
import laika .theme .Theme
28
29
import laika .theme .ThemeBuilder
@@ -32,9 +33,14 @@ import java.net.URL
32
33
33
34
object TypelevelHeliumExtensions {
34
35
36
+ @ deprecated(" Use overload with scala3 parameter" , " 0.4.7" )
37
+ def apply (license : Option [(String , URL )], related : Seq [(String , URL )]): ThemeProvider =
38
+ apply(license, related, false )
39
+
35
40
def apply (
36
41
license : Option [(String , URL )],
37
- related : Seq [(String , URL )]
42
+ related : Seq [(String , URL )],
43
+ scala3 : Boolean
38
44
): ThemeProvider = new ThemeProvider {
39
45
def build [F [_]](implicit F : Sync [F ]): Resource [F , Theme [F ]] =
40
46
ThemeBuilder [F ](" Typelevel Helium Extensions" )
@@ -49,7 +55,11 @@ object TypelevelHeliumExtensions {
49
55
Path .Root / " site" / " styles.css"
50
56
)
51
57
)
52
- .addExtensions(GitHubFlavor , SyntaxHighlighting )
58
+ .addExtensions(
59
+ GitHubFlavor ,
60
+ if (scala3) SyntaxHighlighting .withSyntaxBinding(" scala" , DottySyntax )
61
+ else SyntaxHighlighting
62
+ )
53
63
.addBaseConfig(licenseConfig(license).withFallback(relatedConfig(related)))
54
64
.build
55
65
}
0 commit comments