Routing

File Structure

Circulate has two types of content:

  • Pages
  • Collections

The file structure of these two content types defines the URLs that are generated by Circulate.

Pages

Page files are kept in /_content/pages and each consists of a folder and an index.md file. Their order is determined by the order prefix (a number followed by a period) in folder name. The order prefix is stripped out of the URL automatically. Pages can also be hierarchical. For example:

/_content/pages
 ├- index.md
 ├ /1.services
 | └- index.md
 └ /2.about
   ├- index.md
   └ /1.contact
     └- index.md

Based on this file structure, the following URLs would exist:

  • /
  • /services
  • /about
  • /about/contact

Collections

Collections are kept in /_content/collections, each in their own subfolder, and contain a flat list of "entries". You can create as many collections as you like and each collection can contain any number of entries with a date or numerical order prefix and a slug for a filename. For example:

/_content/collections
 └ /blog
   ├- 2018-02-01.example-post-1.md
   ├- 2018-02-02.example-post-2.md
   └- 2018-02-03.example-post-3.md

Based on this file structure, the following URLs would exist:

  • /blog/example-post-1
  • /blog/example-post-2
  • /blog/example-post-3

Next

Next you should find out how to create some content.