-
Notifications
You must be signed in to change notification settings - Fork 18
Pages
Florian Süsstrunk edited this page Oct 20, 2016
·
9 revisions
filename | description |
---|---|
page.hbs | handlebars template for the html output |
page.data.js | data structure of page, meta-informations & data |
gulp scaffold
- choose Page
- name your page
When creating a new page using the scaffold task a template/boilerplate is used to clone it. it is located here: ./source/pages/.scaffold. in these template-files are placeholders that get replaced with your page name {{name}}. feel free to change the templates to your project-specific needs.
Data defined in the meta object of the page.data.js is mainly used for the index-page. please refer to Index for available options.
In order to add created modules you have to do two things.
- require the data from the created module in the data.js of your page. e.g.
modules: { mymodule: requireNew('../../modules/mymodule/mymodule.data.js') }
- include the module-template in the handlebars template. e.g. {{> "modules/mymodule/mymodule" modules.mymodule}}
By default a page uses the layouts/layout file as base (except when you change the scaffold-template for pages).