Something went wrong. Try again.
static-site-generator blogging hypertext ocaml
Something went wrong. Try again.
1.3 kB · 45 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 $ forester init > /dev/null
$ cat > trees/index.tree << EOF > \title{Root} > \subtree{ > \title{Alpha} > \subtree{\title{Alpha child}} > } > \transclude{foo} > \<div>{\subtree{\title{Wrapped}}} > \scope{ > \put\transclude/toc{false} > \subtree{\title{Excluded from toc}} > } > \subtree{\title{Beta}} > EOF
$ cat > trees/foo.tree << EOF > \title{Foo} > \subtree{\title{Foo child}} > EOF
$ forester build > /dev/null
$ tr '\n' ' ' < output/index/index.html | grep -oE '<section class="block[^"]*"( data-taxon="[^"]*")? id="[^"]*"' | grep -oE 'id="[^"]*"' id="id--5b14-2c-2072-29" id="id--5b42-2c-2070-29" id="id-https-3a-2f-2fwww-2emy-great-forest-2enet-2ffoo-2f" id="id--5b13-2c-2039-29" id="id--5b98-2c-20122-29" id="id--5b164-2c-20198-29" id="id--5b202-2c-20223-29"
$ grep -oE 'data-target="[^"]*"' output/index/index.html data-target="#id--5b14-2c-2072-29" data-target="#id--5b42-2c-2070-29" data-target="#id-https-3a-2f-2fwww-2emy-great-forest-2enet-2ffoo-2f" data-target="#id--5b13-2c-2039-29" data-target="#id--5b98-2c-20122-29" data-target="#id--5b202-2c-20223-29"
Only one entry since it only appears in the mainmatter, not the toc:
$ grep -c 'Excluded from toc' output/index/index.html 1