Folder Structure #
/.butterflyBuild: compiled output/src: contains content that needs to be converted or compiled/style: sass markup that is compiled to/public/__bbbfly/style/pages: contains pug/html/markdown that is compiled to public, preserving the directory structure - like classic html path shit/md_templates: templates that are used by the markdown parser/components: pug components that can be included into pages and are compiled to/public/__bbbfly/componentsfor use on the client/public: as-is assets;
Markdown File Specification #
Template #
- A pug template that can be used by markdown files in
/pages - The compiled content is passed in the
convertedlocal - Make sure to use a ! to tell pug to include the raw content
- other passed locals:
url: url this file will havearticles: article cacheauthor: authortimeDate Object for date defined in headervars: Custom Object defined via markdown file headerdocInfo: DocInfo (obtained by HTML scraper)- functions
isSubpathandgetFolderfor working with the article cache
Markdown File #
It’s just markdown except:
Links may be converted to embeds
Anchor tags may be included
hopefully custom styles at some point
Can include JSON metadata in a md comment on the first line (“Header”)
[//]: # '{"template": ""}'template: String – specifies the name of the pug template used (or default.pug)tags: String[] – list of tags used to group of documentsvars: Object – values will be inserted into pug locals
lang: String, can be “de”, will sometimes do somethingparserOptions: Object - may in future set the parser options
window.halle();
window.halle();
window.halle();
window.halle();
window.halle();
v
v
v
window.halle();
window.halle();
window.halle();
Datatypes #
document info #
- title, description, fulltext
sections: Array of section objectstext: Headline of this sectionanchor: Tag, used to skip through the pagelvl: heading levelsub: Array of subsections
article cache #
- root is a folder object for
/pages - Folder Object:
author #
- defined in
/src/authors.json- array of objects outlined below
displayName- name that may be displayed by pug fileavatarUrl- should be a url pointing to a (square) image, that may […]description- description that may […]
About me
Konrad
Euer charismatischer Gastgeber hier auf Konrad Webseite.