Fork me on GitHub


Razor and Markdown static site generator


Ocam expects your site to have the following top level directories.


The Includes directory contains any page fragments that will be reused from other pages. They are similar to the ASP.NET MVC concept of partials. To reference an include, use the @Include() helper.


The Layouts directory contains any layout templates that will be referenced by Markdown or Razor files. A Layout is much like the MVC concept of layout. It typically contains the structure of an HTML page. The only requirement is that a call to @RenderBody() be present somewhere on the page. This method causes the contents of the referencing page to be emmited at that location.


This directory contains the structure and content of your static site. It usually contains an, index.cshtml, or index.html, at a minimum. Any files that are not Razor or Markdown will be copied to the Html directory verbatim.


This file will be created if it's not already present. During processing, the Site directory is transformed to the Html directory. The directory will be created if it's not present. Any static files, such as JavaScript, CSS, or images will be copied over directly.

To take your site live, all you have to do is upload the Html directory to a Web server


The Code directory is used for plugins. It is still an experimental feature, so it won't be covered here in detail. The idea behind the code directory is that generic C# code can be added here and referenced by layouts and other templates at build time. Any C# files found in the Code directory will be compiled into an assemblies and loaded into Ocam at runtime.


Any non layout or include templates can be put into the Templates directory. The current categories and tags generator will make use of Category.cshtml and Tag.cshtml if it finds them in this directory.