Test Headings

This commit is contained in:
Nathan McCarty 2025-02-21 16:23:02 -05:00
parent 85ead54619
commit 68928aeb20
5 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,16 @@
module Main
import SSG.Djot
import SSG.HTML
import System
import System.File
main : IO ()
main = do
Right contents <- readFile "test.dj"
| Left err => do
printLn err
exitFailure
let parsed = djot contents
putStr . render . renderHtml $ parsed

View file

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html lang=en>
<body>
<h1>Level 1 Heading</h1>
<h2>Level 2 Heading</h2>
<h3>Level 3 Heading</h3>
<h4>Level 4 Heading</h4>
<h5>Level 5 Heading</h5>
<h6>Level 6 Heading</h6>
<p>####### Level 7 Not a Heading</p>
<h1>A heading that spans multiple lines</h1>
<h1>Heading</h1>
<p>Some content</p>
<h2>A sub heading</h2>
<p>Even more content</p>
<h1>Back up</h1>
<p>Some final content</p>
</body>
</html>

View file

@ -0,0 +1,6 @@
rm -rf build/
flock "$1" pack -q install-deps test.ipkg
pack -q run test.ipkg
rm -rf build/

View file

@ -0,0 +1,28 @@
# Level 1 Heading
## Level 2 Heading
### Level 3 Heading
#### Level 4 Heading
##### Level 5 Heading
###### Level 6 Heading
####### Level 7 Not a Heading
# A heading that
spans multiple lines
# Heading
Some content
## A sub heading
Even more content
# Back up
Some final content

View file

@ -0,0 +1,7 @@
package a-test
depends = SSG
main = Main
executable = test