Pages are the fundamental building blocks of your website. Below you can find out how to setup a page from scratch.

## 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).



In this example, the presentation page full path will be `/company/presentation`.

## Use the command line generator



You will be asked 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**.

Note: In the generate command, you can set the full path of your page:

`bundle exec wagon generate page company/presentation`. It will create **app/views/pages/company.liquid** and **app/views/pages/company/presentation.liquid**.

## Page header

Before the page content, there is a **header**, enclosed by "---". It contains meta-information about the page using the yaml syntax.



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:

PropertyDescription
titleThe page title is used in the backoffice and in your template. You can use `{{ page.title }}` to display it in your page template.
publishedIf set to false, the page won't be publicly visible once hosted in an engine. It will be visible within the Wagon webserver.
listedThe listed option is used to decide if the page should be listed in the menu.
positionSet the position among sibling pages. This is used for ordering in menus. Accepts integers (1, 2, 3, ...)
seo_titleSet the title for SEO, you can use it through the `{% seo %}` tag or `{{ page.seo_title }}` in your page template.
seo_descriptionSame as `seo_title` for the meta description. You can use `{{ page.seo_description }}` in your page template.
seo_keywordsSame as `seo_description` for the SEO keywords. You can use `{{ page.seo_keywords }}` in your page template.
redirect_urlSet a redirection to the given url (301).