Page Routing — HTMQL Documentation

Page Routing

The folder and file names are used to determine the URL of the page. For example:

  • ./pages/hello.htmql will be available at http://server/hello
  • ./pages/testing/index.htmql will be available at http://server/testing
  • ./pages/testing/page.htmql will be available at http://server/testing/page

Variable file names (also known as 'slugs') are available using [] in the file name. For example, ./pages/hello/[world].htmql will be available at http://server/hello/john and the page will have a variable world with the value of john. Only one slug file can be used in each folder. If multiple slugs are found, only the first one will match.