Supported File Types

(And what folder.mark does with them.)

How a Page is Built

folder.mark assembles content into alphabetical order by file/folder name unless otherwise specified (e.g. you can force things into chronological order by modification date) (not yet implemented)

The following file types are recognized and dealt with as specified:

Markdown and Markup

txt text and markdown files are assumed to be in markdown format and rendered into HTML and inserted. Note that markdown allows inline HTML.

html htm files are included unchanged.

xml files are included unchanged.

php files are __include()__d inline. (In other words, they're executed.)

Note that html, xml, and php files are collectively considered to be "source" files. If there's only one such file in a directory and it appears to be a complete page (e.g. if an HTML or text file starts with a <!DOCTYPE....> tag or an XML file starts with an <?xml ...> tag) then folder.mark will simply output the content of that file and consider its work done.

Also note that, right now, GET parameters don't make it through to your PHP scripts, so you can either build out PHP web app code (e.g. for JSON stuff) outside your content folder, hack the .htaccess as required, or stick to POST parameters.

Style Sheets

less css files are included in the page header using <link...> tags. If a css file name includes a media type after an underscore then it will be specified for that media type, e.g. custom_print.css would be inserted as print. (to be implemented)

js files are included in the page (in order) just before the close <body>.

jpg jpeg gif png files are included as in <img ... > tags.

Audio & Video

m4v files are included using HTML5 <video...> tags.

mp3 files are included using HTML5 <audio...> tags.

By default, folder.mark uses av.js to automatically wrap video and audio in Flash embed tags if the browser doesn't support h264. folder.mark includes a generic open source Flash media player component to support such browsers.

Also note that if you want fine control over how media files are embedded in your page you can stick them in an appropriately named or invisible subdirectory and just use whatever html takes your fancy.


zip pdf dmg msi files are incorporated as download links.

files markdown 08/14/2011 10:44:59

Powered by FolderMark