What's Konsensus?

Konsensus ("consensus" in English) is the site generator 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.

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

Why write my own engine? Here's a few motivations:

Here's an example from the schema (and also a demonstration for the use of Rouge and the fancy Gruvbox theme)

# 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})

Sounds perfect so far?

Well, everything can't be that.. unfortunately Konsensus is currently not available for public usage, and may not necessarily ever be in its whole form. The engine can also hold a few secrets, and those would need to be cleaned up before public presentation.