Coder Social home page Coder Social logo

metanorma.org's Introduction

Metanorma Open Project Site

Build Status Build Status

Introduction

This is the Metanorma project site (a Ribose Open Project Site) located at https://www.metanorma.org.

It is implemented as a Jekyll site with jekyll-theme-open-project theme.

Custom features

When adding a blog post, it’s possible to have an illustration that is replaced on hover with another illustration. To do that, use the following markup:

[.hoverable]
.Image title
[link="/assets/blog/image-1-on-hover.png"]
image::/assets/blog/image-1.png[Alt text]

And make sure widget JS is included via post’s frontmatter:

extra_scripts:
  - src: /assets/js/hoverable-illustrations.js

Content management

Whenever you delete or rename a page, it’s important that you leave a redirect.

To leave a redirect, add an entry under redirect_from key in the frontmatter of the page where you want to redirect to. For an example, see https://github.com/metanorma/metanorma.org/blob/main/_pages/author.adoc.

Important
Try to reduce such changes with careful planning, and never delete or rename pages without leaving a redirect.

Adding a flavor

  1. Settle on flavor and markup abbreviations.

    • Flavor abbreviation is not typically the same as organization abbreviation; usually it ends with "D"—e.g., M3AAWG is M3AAWG’s flavor abbreviation.

      Important
      The --type flag given to Metanorma-CLI is expected to reference the same flavor abbreviation in lowercase.
    • Markup abbreviation usually takes the form of Ascii<uppercase flavor abbreviation>.

  2. Settle on flavor authoring docs structure. Metanorma flavor documentation is usually split into following sections:

    • Getting started (markup mostly auto-generated)

    • Sample document play guide

    • One or more pages offering topic guides: how sections are formatted, how references are formatted, any specifics about build, etc.

    • One or more pages offering reference guides: a complete list of custom document attributes (either new attributes or attributes which behave differently compared to "base" Metanorma), a list of unsupported AsciiDoc features, etc.

      Tip

      As a rule, it is helpful to provide different angles through both topics and references: former for newer authors, and latter for more experienced authors.

      Really simple flavors can omit separate topics/references sections and just provide a single authoring guide page with any specifics.

      Metanorma-IETF shows an example of more complex flavor docs, Metanorma-M3AAWG shows an example of more basic flavor docs.

  3. Create flavor authoring docs entry page. Place <lowercase flavor abbreviation>.adoc under author/, with following contents:

    ---
    layout: <lowercase flavor abbreviation>-flavor (1)
    title: Metanorma for <uppercase flavor abbreviation>
    ---
    :page-liquid:
    
    {% include flavor-quickstart-steps.adoc flavor=layout.<lowercase flavor abbreviation>_flavor %}
    1. We will define that layout shortly.

  4. Create flavor authoring docs. Create a directory author/<lowercase flavor abbreviation>/ (flavor docs root) and place .adoc files inside according to desired documentation structure. All files should specify frontmatter with the same layout as flavor docs entry page.

    • If topic and reference guides will be provided, index pages topics.adoc and ref.adoc should be provided under flavor docs root (can omit content). Topic and reference guide documents must live under correspondingly named sibling directories, topics/ and ref/.

    • Sample document guide should be placed in sample.adoc. It’s suggested to ensure that your sample document build process is consistent with other flavors, and that you use includes to avoid repetition, though you can provide custom instructions if needed. See author/m3aawg/sample.adoc for an example with default basic build instructions (via include), and author/iso/sample.adoc for an example with custom build instructions.

  5. Add implementing gem under _software/, filename should reflect the actual package (gem) identifier, usually it would be metanorma-<lowercase flavor abbreviation>.adoc.

    See e.g. _software/metanorma-ietf.adoc for an example.

  6. If defined, add data model spec under _specs/, filename should reflect repository name, usually it would be metanorma-model-<lowercase flavor abbreviation>.adoc.

    See e.g. _specs/metanorma-model-iso.adoc for an example.

  7. Create layout named <lowercase flavor abbreviation>-flavor.adoc. The layout will contain extensive frontmatter and no content of its own, only the {{ content }} placeholder.

    Layout frontmatter structure is shown below. Fill in placeholders in angular brackets, square brackets denote optional elements:

    layout: flavor
    docs_title: Metanorma for <uppercase flavor abbreviation>
    title: Write <organization abbreviation> <documents|standards> with Metanorma
    
    <lowercase flavor abbreviation>_flavor:
      base_url: /author/<lowercase flavor abbreviation>
      title: <uppercase flavor abbreviation>
      title_org: <organization abbreviation>
      title_org_full: <full organization name, unpacking abbreviations>
      markup_name: <markup abbreviation>
    
      # Should be identical to filename (no extension) of the entry under `_software`
      # corresponding to the gem implementing the flavor.
      implemented_by: <software entry>
    
      build:
        # (self-explanatory)
        cli_flags: "--type <lowercase flavor abbreviation>"
    
      # Sample document, recommended as a quick-start for new authors
      sample:
        title: <sample document title>
        repo_url: <URL of repository, including path to the exact file, if needed>
    
        # (optional)
        # If you have self-containing HTML file showcasing built sample document for the new flavor,
        # you can place it under `_pages/`, and reference filename here this way:
        rendered_url: https://www.metanorma.org/<built-sample-html-filename>/
        # …or, if it's available elsewhere, this way:
        rendered_url: https://metanorma.github.io/…/
    
      # Desired navigation structure. Example given.
      navigation:
        items:
        - title: Get started
          path: /                            # References author/<flavor abbr>.adoc
        - title: Sample
          path: /sample/                     # References author/<flavor abbr>/sample.adoc
        - title: Usage
          path: /topics/                     # References author/<flavor abbr>/topics.adoc
          items:                             # Implies author/<flavor abbr>topics/* files exist
          - title: Markup
            path: /topics/markup/            # References author/<flavor abbr>/topics/markup.adoc
            items:                           # Implies author/<flavor abbr>/topics/markup/* files exist
            - title: Example
              path: /topics/markup/example/  # References author/<flavor abbr>/topics/markup/example.adoc
        - title: Reference guides
          path: /ref/
          items:
          - title: Document attributes
            path: /ref/document-attributes/
    
      # Key links to documentation (relative) or external resources (absolute)
      # instrumental for new authors. Example given.
      docs_entry_points:
        - path: ./topics/markup/example/
          title: quick markup example
        - path: ./topics/
          title: topics
        - path: https://github.com/metanorma/rfc-in-asciidoc-template
          title: document template
    
      # (optional)
      # Should be identical to filename (no extension) of the corresponding entry under `_specs`,
      # if any.
      data_models: <specs entry>
    
      # (optional)
      # Use for "experimental" flavors not ready for production.
      experimental: yes
  8. Add corresponding entry in the table under _pages/flavors.adoc.

Development

Getting started

  • Ensure you have reasonable Ruby version

  • Run bundle from within site directory to install Ruby dependencies

Serving site preview

  • Run jekyll serve from within site directory

Structure

This repository contains a _config.yml for specifying the directory structure, metadata, build defaults, etc.

Site data is located in this directory and the resulting build is created under _site/.

Inputs

All source files are inside the _jekyll/ directory, as specified in _config.yml.

Outputs

All output files live inside the _site/ directory, and its content have been gitignore-d.

Usage

Preparation

To begin developing,

make prep

which would install the necessary Ruby gems for you.

Auto-build

To make it watch for file changes and build automatically (which watches only the files specified in the above Inputs section), run:

make watch

If you want to be sure all outputs are cleaned prior to building, run:

make clean-watch

Just build

The non-watching equivalents for the above are simply:

make build
make clean-build

Deployment

This section is only for deployment.

Configuration

Configure the hostname and region in the ro-site.rc file as you know it.

cp ro-site.rc.template ro-site.rc
vi ro-site.rc

Uploading to S3

If you have access to the bucket, run this.

export AWS_PROFILE=myprofile
source ro-site.rc
make upload

Clear CloudFront caching

The sites are accessed via CloudFront. If you’re seeing stale data after make upload, most likely the CloudFront cache needs to be invalidated.

Your AWS account must be authorized to invalidate the CloudFront cache for this distribution.

export AWS_PROFILE=myprofile
source ro-site.rc
make clear-cf

Workflow

  1. Ensure tests pass

  2. Create your feature branch (git checkout -b my-new-feature)

  3. Commit your changes (git commit -am 'Add some feature')

  4. Push to the branch (git push origin my-new-feature)

  5. Create new Pull Request

metanorma.org's People

Contributors

abunashir avatar andrew2net avatar anermina avatar camobap avatar intelligent2013 avatar kickoke avatar kwkwan avatar manuelfuenmayor avatar opoudjis avatar paolobrasolin avatar petertky avatar ribose-jeffreylau avatar ronaldtse avatar ryzokuken avatar skalee avatar strogonoff avatar techtrailhead avatar tgolubev avatar w00lf avatar webdev778 avatar wkwong-ribose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metanorma.org's Issues

Short introduction to the Metanorma toolchain

I've been replying to emails with this kind of brief, since our site doesn't quite explain what it is well?


The fastest way to start are these two pages:

A number of other standard documents are supported, such as CSA, M3AAWG, UNECE — the documentation for them are on their own respective GitHub pages (see https://www.metanorma.com for all supported flavors).

Explanation

The toolchain works like this (in the case of ISO documents):

  1. The text input is in AsciiDoc (“.adoc”) format.

  2. (“Compiling”) The first stage of the converter compiles an XML file we call “ISOXML” (https://github.com/riboseinc/metanorma-model-iso/), which is an instance of the StandardDocument model. It is the semantic version of XML that fully adheres to ISO/IEC Directives Part 2. “StandardDocument” is a data model that provides a “standard for Standard documents”. (https://github.com/riboseinc/metanorma-model-standoc)

  3. (“Rendering”) The second stage of the converter converts ISOXML into any kind of output format. The software currently supports Word and HTML outputs. The Word output is fully compliant with the Directives Part 2 (Part 2 does not specify HTML requirements).

The benefit of this toolchain is that there is a true end-to-end, “author-to-paper” flow. For example, when the author types in an equation in the input format, it is guaranteed to come out correctly in the end format. The author is able to self-iterate the input document to tweak to the correct output, in an XML-strucutred way.

The toolchain fully supports the entire Directives Part 2 — equations, references, tables, footnotes, citations, terms and definitions, annexes and even appendixes (annex of annex). Any document currently in ISO can already be represented in this manner — therefore easy to migrate over.

The entire toolchain is open-source and offered for free.

Example

As an example, I’ve attached the ISO standard template “Rice model” document in AsciiDoc (input), and Word (output) as a demonstration of what it does. (it’s actually from here: https://github.com/riboseinc/isodoc-rice)

Benefits

The benefit of this approach is — if someone prefers (La)TeX, they just need to write a (La)TeX converter for stage 1 and swap out AsciiDoc with it. The rendering part (stage 2) doesn’t need any changing.

One issue I constantly find is about making cross-references and numbering/sorting of terms and definitions. This is all automatic and painless. The pure text format makes it easy to handle versioning using a source code versioning repository, like Git.

References are automatically fetched — simply citing <<ISO27000,ISO/IEC 27000>> will automatically fetch the full title and document identifier, there’s no need to copy/paste titles from the ISO website.

More details

For more details on how to use the toolchain, view the pages of the specific Metanorma flavor:

Sample documents


Introduce the “Samples” page; distinguish between specs and samples

This is potentially of lower priority, we might just do with a “Sample” tag and let users find samples among spec documents this way. The “Samples” page makes sense from UX standpoint, and is something that’s in the design mock-ups. However, currently we have all specs mixed in. We might want to go one of the following routes:

  • Route A: (1) add a marker to specs that are spec samples; (2) override the spec index layout and exclude sample specs; and (3) have the “Samples” page use the index layout, but only including specs with that marker.

  • Route B: (1) introduce a new data entity (spec sample); (2) migrate specs that are actually spec samples to those entities; and (3) have the “Samples” page an index of spec sample entities, mimicking spec index in other regards.

  • Route C: build on top of the initial tag implementation and use the special “Sample” tag as the marker. Override spec index layout to exclude items with the tag and make sample index only include items with the tag.

Samples index would probably use the same layout as spec index but possibly e.g. without the tag filter.

New blog post for installing Metanorma using Chocolatey

Draft text below.

Metanorma now awailable for Windows as chocoltey package!

{Date}

for a long time in the world of windows there was no tool for installing software in the "Linux style", but the situation is beginning to change ...

In 2011, a tool called Chocolatey was released.

Chocolatey is a package manager and installer for software packages, built for the Windows NT platform. It is an execution engine using the NuGet packaging infrastructure and Windows PowerShell to provide an automation tool for installing software on Windows machines, designed to simplify the process from the user perspective.

To install Chocolatey you can followup this guide https://chocolatey.org/docs/installation

Once it's installed you can get metanorma in one single command cinst metanorma

By the end of this command you will get

Environment Vars (like PATH) have changed. Close/reopen your shell to see the changes (or in powershell/cmd.exe just type `refreshenv`). 
 The install of metanorma was successful.
   Software install location not explicitly set, could be in package or
   default install location if installer.

Chocolatey installed 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Done! Now you are ready to use metanorma CLI tool

Learn more about about how Metanorma can help you create and unify your standards at https://www.metanorma.com.

Linked articles:

Why Chocolatey?

Remove "is ribose open" from hero image on index

It appears that we don't want to be too hard-sell, and it's sufficient to keep "ribose open" in the footer. We prefer people judging us after using the toolchain rather than to display the affiliation early on.

What do you think?

Travis CI build error: bad argument

I’m not sure what’s the cause, as the message is a bit cryptic:

https://travis-ci.com/riboseinc/metanorma.com/builds/90256237

jekyll 3.8.4 | Error:  bad argument (expected URI object or URI string)
rake aborted!
Command failed with status (1): [JEKYLL_ENV=production jekyll build --confi...]
/home/travis/build/riboseinc/metanorma.com/Rakefile:65:in `block (2 levels) in <top (required)>'
/home/travis/.rvm/gems/ruby-2.5.1/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/travis/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `eval'
/home/travis/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => test:production => build:production
(See full trace by running task with --trace)

@ronaldtse could you help or refer someone?

Find content for metanorma.com

Including migrating wiki content about gems into docs/ for those gems.

@strogonoff, this is going to take a while, and the docs are going to need refactoring; I'll keep you informed as I do this.

Providing sample documents for every standard type

For example, for MPFA documents, we have them here:
https://github.com/riboseinc/mpfd-documents/

People usually work with only one type of standard, and that's all they need to know. We should give them the samples they want to see, not saying something like "just read this syntax once and you can work with all types of Metanorma documents".

  1. We should have a page for "General Metanorma input syntax". Right now only "AsciiDoc", but foreseeable to have LaTeX or Word.
  2. Separate pages for syntaxes only pertaining to one (or more) types of standard documents.

Announce the IBA 2018 Gold Stevie wins

Metanorma has won the following entries at the 15th International Business Awards:

  • Gold Stevie Award: Best New Product or Service of the Year - Content - Semantic Technology Platform, Tools and Applications
  • Gold Stevie Award: Best New Product or Service of the Year - Content - Scholarly Publishing Information Solution

We should put this on the site. The logo is uploaded in 9bbdb87.

Document the Word doc generation caveats

The Word doc format produced by Metanorma is called Word MHT, which is not a typical Word file.

Caveats:

  1. The Table of Contents must be updated using real Microsoft Word to have correct page numbers
  2. The Metanorma generated Word document cannot be read by OpenOffice / LibreOffice.

In order to convert the .doc file into a typical Word file (.doc or .docx), you need to follow these steps:
https://github.com/riboseinc/html2doc#converting-document-output-to-native-word-docx

This information should be put on metanorma.com.

New topic: Recommend text editors

Users of metanorma wish to know what editors are recommended for its usage.

The recommended ones from users are:

  • Atom with Asciidoctor plugin
  • Microsoft VScode with AsciiDoc preview

Introductory blog post & improving site coverage

Here are topics to cover in the introductory post:

  • the core idea behind Metanorma,
  • how it came around,
  • what value it brings, what positive change it is intended to make in the industry,
  • what stage the project is at overall, what third-party support exists, etc.,
  • how can one make use of it now (for example, getting started with software), and how to contribute.

Bare-bones Metanorma.com site will be launched with empty blog. While preparing the above article, gaps in site content will be discovered. (E.g., we’ll want to link to some software package or a page which is not yet part of the site.)

Completion of the blog post will imply filling in those gaps in site’s content. This is a good way to get the Metanorma.com into better shape without trying to perfect it by random walk.

Integrating Metanorma pages into Jekyll

We have a number of specs written in Metanorma format, such as in MetanormaISO, in their own git repos.

We wish to submodule them in metanorma.com (and other Open Sites) and display them on the static site.

This task is to build a Jekyll plugin that automatically invokes the Metanorma toolchain to build those files into HTML output, and incorporate that HTML output (and styled correctly) into the static site.

cc: @opoudjis could you chime in your thoughts? Thanks!

Project pitch

The pitch follows tagline on our Open Project site’s main page hero unit.

Tagline for Metanorma was already provided on Ricardo’s design mock-ups as “We have made the standards of standards tool”. However, the pitch was merely a placeholder.

Let’s brainstorm the pitch for Metanorma! Perhaps a good candidate already exists somewhere in the documentation, or perhaps we can come up with something.

Per designs we have, I estimate the pitch should be 1–2 sentences and 10–18 words total. Anything too far out of these bounds may not look great, but we can play with typography to a degree, so anyway there’re no wrong answers here.

screen shot 2018-07-01 at 7 32 46 pm

List out standard document types we support with each a separate page

We currently handle standard documents from these organizations:

  • ISO
  • CalConnect
  • IETF
  • Chinese standards
  • CSA
  • M3AAWG
  • IEC (soon)

Technically, each of these deserve a couple separate pages (or separate sites) to explain how to use them and the document types (and show samples) they can create in these organizations.

Thought @opoudjis ?

"Pinning" of certain entries on top

We now have an number of software + specification entries on the front page, but obviously some are more important than others.

  1. Can we use a grid view for better viewing?
  2. Can we specify some "priority" value to sort with so that we can control the order?

screen shot 2018-08-28 at 1 53 07 pm

Adding the "Flavors" tab

Since there are many "flavors"/"classes" of Metanorma now we should create a tab for different flavors.

CI not building the site?

I believe the update was pushed a while ago (yesterday), but it’s not reflected on www.metanorma.com still.

Is CI build failing with the newest theme/helpers gem version? Or is it something like CDN caching?

Blog author details

@opoudjis can I have your details to add a pretty author block with your face as assumed by theme design? Need an email (best if it’s associated with a Gravatar pic, currently the only out-of-the-box way to show author’s photo), any profile links (Twitter, LinkedIn, FB, etc) are good too

There’s a YAML frontmatter structure that makes this work, I can add it to the existing posts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.