-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathMain.lean
More file actions
66 lines (61 loc) · 2.39 KB
/
Copy pathMain.lean
File metadata and controls
66 lines (61 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/-
Copyright (c) 2024-2025 Lean FRO LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: David Thrane Christiansen
-/
import Manual
import Manual.Meta
import VersoManual
import Manual.ExtractExamples
open Verso.Genre.Manual
open Verso.Genre.Manual.InlineLean
open Verso.Output.Html in
def plausible := {{
<script async src="https://plausible.io/js/pa-RTua_4FfKHhfAvAc3liZd.js"></script>
<script>{{Verso.Output.Html.text false r#"
window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
plausible.init()
"#}}</script>
}}
open Verso.Output.Html in
def staticJs := {{
<script src="static/metadata.js"></script>
<script src="static/print.js"></script>
{{ if false then -- Flip this bit to test live links locally
{{ <script>"window.metadata = {'latest': true};"</script> }}
else
.empty }}
}}
open Verso.Output.Html in
def staticCss := {{
<link rel="stylesheet" href="static/colors.css" />
<link rel="stylesheet" href="static/theme.css" />
<link rel="stylesheet" href="static/print.css" />
<link rel="stylesheet" href="static/fonts/source-serif/source-serif-text.css" />
<link rel="stylesheet" href="static/fonts/source-code-pro/source-code-pro.css" />
<link rel="stylesheet" href="static/fonts/source-sans/source-sans-3.css" />
<link rel="stylesheet" href="static/fonts/noto-sans-mono/noto-sans-mono.css" />
}}
def main :=
manualMain (%doc Manual) (config := config) (extraSteps := [extractExamples])
where
config := {
extraFiles := [("static", "static")],
extraHead := #[plausible, staticJs, staticCss],
emitTeX := false,
emitHtmlSingle := .no, -- for proofreading
logo := some "/static/lean_logo.svg",
sourceLink := some "https://github.com/leanprover/reference-manual",
issueLink := some "https://github.com/leanprover/reference-manual/issues",
searchPriorities := {
domains := .ofList [
(`Verso.Genre.Manual.doc.tech, 65),
(`Verso.Genre.Manual.doc, 60),
(`Verso.Genre.Manual.doc.tactic, 60),
(`Verso.Genre.Manual.doc.tactic.conv, 60),
(`Verso.Genre.Manual.doc.option, 60),
(`Verso.Genre.Manual.example, 60),
(`Manual.examples, 60),
]
},
}