Konsensus Mk I

This program has been phased out, and is no longer in use. This description has been left up for historical purposes. You may perhaps want to visit Konsensus Mk II instead?

Konsensus MkI (“consensus” in English) is the site generator (originally) used to generate this website. Given the input, it outputs a ready directory tree that can be directly copied to a web server and used without further set-up.

Image of the old site

It is written in Ruby, and uses several gems including Redcarpet, Erubis and Rouge.


Why write my own engine? These were the motivations:


Here’s an example from the schema:

# Declare a subscope; a category of pages
subscope do
      # .. all pages in this scope are under the Projects category, unless overriden
      nest_menu(:main_menu, "Projects")

      # Declare a page for Konsensus
      page(url: "projects/konsensus", page_title: "Konsensus", page_description: "Description of the Konsensus project", primary_content: markdown_from_file("md/project_konsensus.md")) do
        # Create a menu item
        nest_menu(:main_menu, "Konsensus", true)

      end

      # Declare a page for Pintograph. Indicate that a table of contents should be printed, and MathJax added
      page(url: "projects/pintograph", page_title: "Pintograph", page_description: "Description of the Pintograph project", primary_content: markdown_from_file("md/project_pintograph.md"), page_properties: {:render_toc => true, :requires_mathjax => true}) do
        nest_menu(:main_menu, "Pintograph", true)
      end

      # Create a project front page. Indicate that a table of contents should be printed.
      page(url: "projects", page_title: "Projects", page_description: "A listing of projects", primary_content: markdown_from_file("md/projects.md"), page_properties: {:render_toc => true}) do
        # Flag this page as the primary option; the menu has been already declared in the enclosing scope
        flag_as_primary(:main_menu)
        # Set this as a item on the top bar
        set_menu(:topbar, "PROJECTS", true)
      end
  end
  
# Declare a blog page
blog_article(29,5,2017, "Solving Boggle with Haskell", "A small code-along to find words from a NxN grid", markdown_from_file("md/blog2017/boggle-29052017.md"), {:render_toc => true, :show_disqus => true})


As it stands of autumn 2018, this version of the program is no longer in use. The engine has been rewritten from ground up in Golang, and is now known as Konsensus Mk II.