Creating Pages

kolber edited this page Mar 9, 2012 · 6 revisions

Each folder within /content which contains a .yml file will become a page. So to create a new page, you just have to make a new folder then create a .yml file within it. The name of the .yml file will tell stacey which template it should use for that page.

By default, pages are listed in numeric order using a numbered prefix on the folder name (1. 2. 3., etc.). The url used to access each page will be the folder name without the number and dot.

ie. a folder named: 1.project-name-10 will be accessed via http://yourdomain.com/projects/project-name-10.

If you have clean urls disabled (which they are by default) then the url will be prepended with a ?/.

ie. a folder named: 1.project-name-10 will be accessed via http://yourdomain.com/?/projects/project-name-10.

If you leave the numbered prefix off a folder, then the page will not show up in any collections (page.siblings, page.children, etc.), but will still be accessible by its url. This is useful for creating ‘floating’ or unpublished pages.

Stacey supports unlimited depths of sub-pages, so you can split your categories into sub-categories & sub-sub-categories. Whatever works for you.

Images

Stacey picks up any images within the page’s folder and automatically inserts them into the page. Like pages themselves, the images are displayed in numeric order.

Images are inserted as is, so they will need to be cropped to the correct size before being added to the folder. The default template relies on images with a maximum width of 560px.

Other assets

Video & .swf files are embedded & included in the same way as images (collated into :swf & :video partials), whereas the content within any .html files will be inserted in place of the :html partial. This is useful for embedding Youtube or Vimeo videos in the page.

.swf or video files will need to be named after the file’s dimensions. ie. 1.800x600.mp4 — where 800 is the movie’s width & 600 is its height.

In addition, stacey will recognise any other assets placed within a page’s folder. Read more about handling other asset types.

Thumbnails

Each page can also have its own thumbnail. They can be added by placing a image file named thumb (.gif, .jpg or .png) within the page’s folder.