This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

FHIR IG publisher templates

From HL7Wiki
Revision as of 07:02, 25 April 2018 by GrahameGrieve (talk | contribs)
Jump to navigation Jump to search

A FHIR IG template are used by the FHIR IG Publishing tool when publishing FHIR Implementation Guides. The templates control:

  • the look and feel of the published IG
  • the way the resources are laid into pages
  • how users navigate around the pages

From the point of view of an IG Author, the IG template consists of a list of files, and documentation that describes how the author writes their own narrative and fits that into the pages described by the template.

Known IG templates

To use a template, you specify the 'template' parameter in the IG. You can nominate either the official code for a template (where it has one defined, which is controlled by the FHIR product director), or the URL of the location of the template.

List of known IGs:

note to template authors: you can add you template to this list, as a url + documentation, but only the FHIR product director can assign standard codes.

Authoring IG templates

The information below is for authors of templates, and is highly technical. It should only be used by template authors.

A template contains 3 kinds of artifacts:

  • a configuration file that describes how resources are rendered into HTML
  • active scripts that generate content as part of the build process
  • jekyll templates / include files / html files

In addition to these artifacts which are for the IG publisher, the template must contain some documentation that describes how an author adds pages and narrative content to the Implementation guide.

Template layout

When accessing a template by it's URL, the IG publisher will first look for [location]/template.zip. The the host location is github.com, the IG publisher will assume that the template is a github repository, and look for /template in the github repository. If the host location is a local directory, the IG publisher will look for /template in the local directory. Otherwise publication will fail

Configuration file

what goes in here:

  • default templates and resources locations

Active Scripts

Note: the IG auto-publisher will only accept templates that include active scripts if they are in the list of standard templates above.

The template can specify scripts that generate content for the IG. The following kinds of scripts can be specified:

  • xslt transforms
  • javascript scripts
  • ant build files?

todo: describe how to invoke the scripts, and what conditions they run under.

Jekyll template files

Any files in template\jekyll wil be passed through untouched to the Jekyll build directory