Often called "pretty URLs", Tapestry will by default compile your project in a way that removes the need for the
.html file extension. For example
source/about.phtml will be compiled to
build_local/about/index.html, which will be accessible from
http://www.example.com/about due to the way that web servers handle default pages.
This functionality may be disabled site wide via the pretty permalink configuration property within your
Or alternatively it may be disabled on a per file basis via setting
pretty_permalink to false within the file Frontmatter, e.g:
--- pretty_permalink: false ---
You can define custom permalinks on a per file basis, this is useful for when you want the file to be output to a particular location or with a certain file extension. For example you may have the source file
source/atom.phtml which you want to output to
build_local/atom.xml. This would be achieved by setting the following Frontmatter.
--- permalink: atom.xml ---
The following table lists the template variables that are available for your custom permalink property.
|The current file extension.|
|The current file filename.|
|The current files relative path, e.g. |
|The year that the file was modified, or if it has a date set via filename or frontmatter method the year that is set.|
|The month that the file was modified, or if it has a date set via filename or frontmatter method the month that is set.|
|The day that the file was modified, or if it has a date set via filename or frontmatter method the day that is set.|
|This is a special tag that is relevant only to paginated pages, it will return the current page number.|
|The current file slug, generated from its title if one is set in the frontmatter or otherwise the filename.|