Rendering tests
Attributes
Page
- page.title: I am the mighty page title!
- page.list array: onetwothree
- page.nested: found
- page.hasChildren: true
- page.childCount: 3
- page.isHomepage: false
- page.isVisible: false
Site
Inherit/import attributes from other pages
- super.title: Hello world!
- super.url: /
Helpers
Active
- active: true
- not active:
- block: true
- block, not active:
Children
- no options: BAC
- reverse=true: CAB
- order="DESC": CAB
- limit=2: BA
- offset=1: AC
- limit=1 and offset=1: A
- sortBy="title": ABC
- sortBy="title" reverse=true: CBA
- sortBy="title" reverse=true limit=1 offset=2: A
Email
Image
- in page folder:

- in site folder:

- in site folder as background image:
Import
- simple, using current page.title: I am the mighty page title!
- passing data: everything
Json
{"deeper":{"here":"found"}}
Link
Pages
- / = Hello world!
- /test/b = B
- /test/a = A
- /test/c = C
Script
- simple:
- with constructor:
- with constructor, pass data:
Style
Vimeo
Youtube
Code blocks and syntax highlighting
module.exports = function plugin () {
asimov
.config('defaultLangCode', 'en')
.config('defaultLangFallback', true)
.config('languages', ['en'])
.config('server.ready', false);
asimov.use(server);
asimov.init(function (next) {
if (process.env.ROLE === 'worker') {
var loader = new Loader({
'frameworkDir': __dirname
});
loader.start(next);
}
else {
next();
}
});
asimov.postmiddleware(require('./lib/middleware/notFound'));
};
Inline code snippets
Foo bar .foo or "fooobar"