Insights into what moves us. Contributions from the Structr team and guests. The Structr Blog

Christian Morgner
03. October 2014
Documentation, Infrastructure, CMS, Announcement,

Our documentation is now hosted on GitHub!

As a part of the release of Structr 1.0 about a week ago, we have finally moved our documentation where it belongs: close to the code. now serves content from GitHub, which has several advantages:

  • the docs are now versioned along with the code
  • the documentation can be updated easily
  • users can contribute via GitHub pull requests

Technical aspects

The following simple set of template expressions allows us to fetch raw markdown content from GitHub and render it into HTML using Structr's built-in markdown renderer.

        if(gt(size(split(path_info, '/')), 2),
            nth(split(path_info, '/'), 1),
  , '/',
store('content', GET(retrieve('path')))
if(empty(retrieve('content')), childsection.content, retrieve('content'))

More information

The above code snippets make use of built-in Structr UI functions which you can read more about at B: Keywords and Functions