1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-15 10:03:22 +03:00
juvix/book.toml
Jonathan Cubides 453996530d
Add syntax highlighting for juvix code blocks in docs (#1971)
This PR adds initial syntax highlighting for juvix code blocks and REPL
sessions in Markdown files rendered by mdbook. After this PR, only two
themes would be supported to ease maintenance: Light and Dark (Ayu).

The implementation is a specifically tailored version of

- https://github.com/anoma/highlightjs-juvix (plugin for
HighlightJS,v11.7).

to be compatible with the infamous HighlightJS 10.1.1, to be used just
for MdBook.

The output can be seen here (make sure the CI finished to check the last
version, otherwise run the website locally):

- https://jonaprieto.github.io/juvix/tutorials/learn.html
2023-04-05 11:24:19 +02:00

61 lines
1.8 KiB
TOML

[book]
title = "The Juvix Book"
authors = [ "Jonathan Prieto-Cubides" , "Jan Mas Rovira" , "Paul Cadman" , "Lukasz Czajka" ]
language = "en"
multilingual = false
src = "docs"
[build]
create-missing = true
[preprocessor.index]
[preprocessor.links]
[preprocessor.pagetoc]
[preprocessor.katex]
renderers = ["html"]
static-css = false
include-src = false
block-delimiter = {left = "$$", right = "$$"}
inline-delimiter = {left = "$", right = "$"}
macros = "theme/latex-macros.txt"
[output.katex]
[output.html]
default-theme = "light"
preferred-dark-theme = "Ayu"
copy-fonts = true
additional-css = ["theme/pagetoc.css", "theme/juvix.css"]
additional-js = ["theme/pagetoc.js", "theme/juvix.js", "theme/pascal.js"]
no-section-label = false
git-repository-url = "https://github.com/anoma/juvix"
git-repository-icon = "fa-github"
[output.html.fold]
enable = true # whether or not to enable section folding
level = 0 # the depth to start folding
[output.html.search]
enable = true # enables the search feature
limit-results = 15 # maximum number of search results
teaser-word-count = 30 # number of words used for a search result teaser
use-boolean-and = true # multiple search terms must all match
boost-title = 2 # ranking boost factor for matches in headers
boost-hierarchy = 1 # ranking boost factor for matches in page names
boost-paragraph = 1 # ranking boost factor for matches in text
expand = true # partial words will match longer terms
heading-split-level = 2 # link results to heading levels
copy-js = true # include Javascript code for search
[output.linkcheck]
follow-web-links = false
traverse-parent-directories = false
exclude = [ ]
user-agent = "mdbook-linkcheck-0.4.0"
cache-timeout = 43200
[output.linkcheck.http-headers]
'crates\.io' = ["Accept: text/html"]