Choose your page slug
The page slug is its name in the url, in a Wagon site it's defined by the filename without extension. It should only contains alphabetic characters, numbers and "-" or "_". The full path of a page contains its parent (and ancestors).
+ index + company + presentation
In this example, the presentation page full path will be
Use the command line generator
bundle exec wagon generate page <<your page slug>>
You will be ask 2 things:
- whether you want HAML template: answer 'no' if you're not familiar with HAML.
- whether you want a localized template: answer 'no' (multilingual is another topic...)
It will generate a file:
app/views/page/<<your page slug>>.liquid.
bundle exec wagon generate page company/presentation
It will create
Before the page content, there is a header, enclosed by "---". It contains meta-information about the page using the yaml syntax.
--- title: Page title published: true listed: false ---
If your page extends another one, remember it should be the first instruction after the header.
Here are some possible options that can be used in the page header:
|title||Pretty obvious... The page title is used in the backoffice and in your template if you use
|published||If set to false, the page won't be publicly visible once hosted in an engine. It will be visible with the Wagon webserver.|
|listed||The listed option is used to decide if the page should be listed in a menu.|
|position||Set the position among sibling pages. This is used for ordering in menus.|
|seo_title||Set the title for SEO, you can use it through the
|seo_description||Same as seo_title for the meta description. You can use
|seo_keywords||Same as seo_description.|
|redirect_url||Set a redirection to the given url (301).|