Templates are bundles of HTML and CSS that make your Cyblog
document look a certain way. Templates use mustache syntax
in conjunction with the @meta-*
declarations from your document
to change their content.
To use the blog
built-in template:
<!-- @template blog -->
declaration.@meta-*
declarations for blogname
and blog-header
. These should be
HTML strings.@meta-blog-footer-items
declaration. This should also be an HTML
string. This string will be placed in the document footer.An example is provided in /examples/templates.cyblog
.
Warning: The presentation
template uses JavaScript to provide its functionality.
If you have JavaScript disabled, pages remain readable, but they no longer act as
slideshows.
To use the presentation
built-in template:
<!-- @template presentation -->
declaration to your document.@meta-*
declarations called presentation-header
and presentation-footer
.
These will be filled into the presentation header and footer.cyblog-presentation
in your document, and add slides to it
by creating Cyblog blocks with the .presentation-slide
class.
Slides support all the usual Cyblog features.See examples/presentation-demo.cyblog
for an example presentation.
Warning: The gallery
template uses JavaScript for some of its functionality.
It will still function without it enabled, but for best results you should leave it on.
To use the gallery
built-in template:
<!-- @template gallery -->
declaration to your document.@meta-*
declarations for gallery-header
and gallery-footer
to add the
contents of the page header and footer..cyblog-gallery
in your document. Inside it, add images
and blocks that will get placed into a block. Images expand when you tap them, the
image alt text is shown below it as a description.To add a custom template or modify an existing one, simply put a directory (named according to cyblog's declaration rules, of course) in one of the config directories listed in README.md.
Note that builtin templates get overwritten on updates, so make copies of default templates if you intend to edit them.