-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathMain.lean
More file actions
51 lines (46 loc) · 1.77 KB
/
Main.lean
File metadata and controls
51 lines (46 loc) · 1.77 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
/-
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 defer="defer" data-domain="lean-lang.org" src="https://plausible.io/js/script.outbound-links.js"></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",
}