Skip to content

AddingDocumentation

Kim Rutherford edited this page Oct 27, 2022 · 2 revisions

Adding and editing Canto documentation

The Canto documentation is here in Git: https://github.com/pombase/canto/tree/master/root/docs

The documentation appears here when Canto is updated/re-released: https://curation.pombase.org/pombe/docs/index/

The docs are mostly written in HTML. It's not pure HTML because we use a Perl templating engine called Mason (https://masonbook.houseabsolute.com/) to allow us to embed Perl code to make some parts of the docs configurable and embed dynamic content.

An equivalent to Mason in Python would be something like Jinja: https://www.fullstackpython.com/jinja2.html

Because of Mason, the syntax for including images in the HTML is unpleasant. Here's an example that embeds "go_edit.png" in https://github.com/pombase/canto/blob/master/root/docs/go_annotation.mhtml

   <img src="<% $c->uri_for($image_path . '/go_edit.png') %>" alt="GO editing interface"/>

The image files themselves are in this directory: https://github.com/pombase/canto/tree/master/root/static/images/docs