Your Webhook site's HTML is split into two folders: pages and templates. Below is the directory structure and HTML file for a basic blog.
The pages folder holds HTML files which you need to turn into fully formed URLs. For example
pages/index.htmlwill become the homepage at yoursite.com
pages/contact.htmlwill become yoursite.com/contact/
pages/contact/index.htmlwill become yoursite.com/contact/ as well, but will supersede the above format.
Also, if you happen to create any
single item types in the CMS, we'll automatically create a
your_type_name.html page for you in there.
The templates directory holds two types of html files:
- Partial includes you wish use in your site like
- Templates that match the content-types in your CMS. For example
The second type are normally built from the CMS through scaffolding. By default we create two templates for every new content type.
list.htmlis the index document for the content-type itself. It's what you'd see at yoursite.com/videogames/
individual.htmlis the index document for the individual items within the content-type. A single videogame would resolve at yoursite.com/videogames/specific-game-name/.
You can also add more templates into your content-type folders to build more than just the
individual.html index page. For example, let's say you want to add a screenshots sub-page to each videogame. To do so you could simply add a new template to
templates/videogames/screenshots.html. This page would render for every videogame at yoursite.com/videogames/specific-game-name/screenshots/.
Custom and vanity URL patterns
For multi-item content-types Webhook allows the ability to further customize the URL structure of your site. In the CMS itself you can dictate the following URL patterns.
- Where the list view of that content-type resolves.
- The default URL pattern for the items within that content type.
- Lastly, you can give a pure vanity name to each individual item name.
The URL patterns you can type into these forms allow the use of variables. Below is a list of acceptable patterns.
||none||Don't use a prefix url for individual items. Your list.html will still render at
||2014||The full publish date year.|
||14||The publish date year, last two digits.|
||02||The publish date month number, leading zero.|
||2||The publish date month number, no leading zero.|
||february||The publish date month name full (january, october, etc).|
||feb||The publish date month short name (jan, oct, etc).|
||03||The publish date day leading zero.|
||3||The publish date day, no leading zero.|
||videogames||The content-type name (e.g. Video Games).|