Skip to content

metanorma/metanorma-generic

metanorma-generic: Metanorma template gem for customisation

Formerly known as metanorma-acme

Gem Version Build Status Code Climate Pull Requests Commits since latest

Functionality

This gem processes Metanorma documents with a configurable template for document options. It is intended for flavours of Metanorma that do not require extensive gem customisation: these flavours inherit from metanorma-generic, instead of directly from metanorma-standoc.

The gem currently inherits from the metanorma-standoc gem, and aligns closely to it.

Configuration

Gem can be configured in 2 ways: 1. By creating yaml config file with name metanorma.yml, see metanorma.yml.example for example. 2. By using the Metanorma::Generic.configuration method directly; for example

---
Metanorma::Generic.configure do |config|
  config.organization_name_short = 'My Organization'
  config.organization_name_long = 'My Organization name'
  config.document_namespace = 'https://open.ribose.com/standards/mine'
  config.xml_root_tag = 'mine-standard'
  config.logo_path = '/metanorma-mine/lib/isodoc/mine/html/logo.jpg'
  config.validate_rng_file = '/metanorma-mine/lib/metanorma/mine/mine.rng'
  config.htmlcoverpage = '/metanorma-mine/lib/isodoc/mine/html/html_mine_titlepage.html'
  config.htmlintropage = '/metanorma-mine/lib/isodoc/mine/html/html_mine_intro.html'
  config.htmlstylesheet = '/metanorma-mine/lib/isodoc/mine/html/htmlstyle.scss'
  config.scripts = '/metanorma-mine/lib/isodoc/mine/html/scripts.html'
  config.scripts_pdf = '/metanorma-mine/lib/isodoc/mine/html/scripts.prd.html'
  config.standardstylesheet = '/metanorma-mine/lib/isodoc/mine/html/'
  config.header = '/metanorma-mine/lib/isodoc/mine/html/header.html'
  config.wordcoverpage = '/metanorma-mine/lib/isodoc/mine/html/word_mine_titlepage.html'
  config.wordintropage = '/metanorma-mine/lib/isodoc/mine/html/word_mine_intro.html'
  config.wordstylesheet = '/metanorma-mine/lib/isodoc/mine/html/wordstyle.scss'
end
---

More information about how to configure this gem is given in Simple adoption on the metanorma.com site.