Build content with Contenticious

Here you'll learn how a (complex) file system structure with markdown documents will be rendered to web sites in detail.

How files and directories map to web sites

Your directory and file names become url path parts. So the file pages/foo/bar/ will be available as /foo/bar/baz.html. That's it, basically.

The directory structure will be used to render a page navigation. In the example above, the content of the directory pages/foo/bar will show up as sub pages of /foo/bar.html. In the default design you'll need to click on the corresponding link to view the sub navigation. For example you need to click on First Steps to view its sub navigation. But what content will be visible after clicking on a directory link? There are two options. The first option is the simple but pretty default directory listing, which will be automagically generated from Contenticious. But if there's a file named in that directory, Contenticious will render its content instead of that listing. This method is used to display the content of First Steps instead of a listing of its three sub pages.

Build the navigation you want

Having that automatic navigation rendering in mind, you may want to define two things: order and names.

The order inside a navigation part is alphabetical like in your file managar, so the page named will show up before If you want to change that order, just rename your file names to contain numbers and an underscore ("_") before the old name. So will go before but Contenticious won't show that numbers in navigation or URLs, so this is a great way to define an exact order.

By default, Contenticious will use the file or directory name for the navigation, but this is not what you want in most cases. For example, first_steps is great in URLs, but First Steps would be better in a navigation for humans. As you learned while you created your first Contenticious page there's the possibility to provide meta information at each file's top lines. Just use navi_name to change a page's name in the automagically generated page navigation:

navi_name: First Steps


Here's a non-trivial example. The following directory structure is used to render this website. The generated navigation is the one you see on top.

file system                     urls
  |--                  /
  |-- 01_first_steps (dir)
  |     |--            /first_steps.html
  |     |--       /first_steps/install.html
  |     |--       /first_steps/prepare.html
  |     '--          /first_steps/live.html
  |--       /build_content.html
  |--          /deployment.html
  |--           /customize.html
  '--               /about.html