Table of contents
No headers
An easy way to share files, is to attach them to pages and then embed them directly into the wiki page itself. The benefit is that it only requires someone to upload a new version of the file to automatically update the page as well.
The following script checks if an attachment exists, and if does, embeds it using a syntax highlter.
{{
var files = map.values(page.files);
if(#files > 0) {
syntax.xml(web.text(files[0].uri))
} else {
"no file(s) attached"
}
}}
Sample output: