Add files used for rendering the markdown files

This commit is contained in:
magmaus3 2022-07-25 19:17:32 +02:00
parent 39345055d6
commit 4d735a2c21
No known key found for this signature in database
GPG Key ID: 966755D3F4A9B251
4 changed files with 47 additions and 1 deletions

View File

@ -1 +1,6 @@
-
This directory contains the pandoc template used to render the markdown files in this repository.
To render a specific file, you need to run the following command:
```
pandoc --from commonmark_x input_file --output=output_file --template=template.html --lua-filter=links-to-html.lua
```

View File

@ -0,0 +1,4 @@
function Link(el)
el.target = string.gsub(el.target, "%.md", ".html")
return el
end

26
tool/md2html/style.css Normal file
View File

@ -0,0 +1,26 @@
table {
border-collapse: collapse;
}
table > thead th {
border: 1px solid black;
border-bottom: 2px solid black;
}
td {
border: 1px solid black;
padding: 0.8em;
}
img {
max-width: 100%;
}
summary > * {
/*
* Make summary display on the same line, instead of
* splitting into multiple lines
*/
display: inline-flex;
}

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0">
<link rel="stylesheet" href="/style.css">
</head>
<body>
$body$
</body>
</html>