Code Monkey home page Code Monkey logo

weatherapi-docs's Introduction

MET WeatherAPI documentation documentation

This repo contains (at some point in the future) most of the docs on api.met.no which are not autogenerated from module POD or metadata.

The content is designed primarily to be shown at https://api.met.no/doc/, but is (unofficially) also visible for development purposes at https://docs.api.met.no/.

It is also possible to add documents here intended for export to the Yr Developer Portal.

Organization

Structure the information according to the Divio Documentation System. Documentation should fall into one of the following categories:

Tutorials

  • Purpose: learning
  • Aim: allow the newcomer to get started

How-to guides

  • Purpose: step-by-step instructions
  • Aim: show how to solve a specific problem

Reference

  • Purpose: looking up specific information
  • Aim: describe the machinery

Explanation

  • Purpose: deeper understanding
  • Aim: explain complex problems

All articles should be marked with the corresponding tag in the YAML preamble.

File structure

The files are organized as illustrated:

    weatherapi-docs/
    ├── doc
    │   ├── assets
    │   ├── locationforecast
    │   ├── metalerts
    │   ├── nowcast
    │   ├── oceanforecast
    │   └── sunrise
    ├── _layouts
    ├── _posts
    ├── products
    ├── schemas
    ├── _site
    └── README.md

This is a typical Jekyll structure, with blog articles in _posts, HTML templates in _layouts and so on. The _site folder is used by Jekyll for auto-generating HTML and is excluded in .gitignore.

API static documentation pages shown under https://api.met.no/doc/ on api.met.no reside in the doc directory. All files here must be in Markdown format, except for assets where you can put PDFs, images etc. (this is a limitation of WeatherAPI, not on GitHub/Jekyll).

Files which are not intended to be processed as Markdown but still included in WeatherAPI may be stored in other directories. E.g. schemas contain the XML schemas used on schema.api.met.no, while products is used to show non-WeatherAPI products on api.met.no. This may be added to in the future, e.g. for microservice metadata.

Running Jekyll

First you must install Jekyll as per the instructions.

To view the documentation locally, start Jekyll:

$ ./site run

You can then open your local version on http://localhost:4000/.

Format

Markdown must adhere to the sub/superset supported by Text::MultiMarkdown.

YAML preamble

All documentation must start with metadata in YAML format, like this:

---
title: Heading of document (do not write this in the body text)
date: when you wrote it
author: your name
layout: page (for docs) or post (for blog)
summary: >
    A short description of the subject matter (used on developer.yr.no)
---

Headings

Use only level 2 headings and below, since level 1 is used for the document title.

Code blocks

For some reason, grave-defined blocks don't work in the API, use 4-space indents instead. Also we have not implemented syntax highlighting, so there is no point in using the former.

# this works

    {
        "foo": "bar"
    }

# this doesn't

```json
{
    "foo": "bar"
}
```

Links

Do not write "click here for more information" as it is considered bad practice.

Since text can be displayed under many different subdomains, all links must be root-relative, e.g.

... see [locationforecast](/weatherapi/locationforecast/2.0/) for info.

Exceptions:

  • Stand-alone tutorials refering to the API product page can use absolute URLs to api.met.no

Copyright stuff

All content not explicitly specified otherwise is licenced by the NLOD and CC BY 4.0 licences. The full text is included in LICENCE.txt in this repo.

Copyright 2020 The Norwegian Meteorological Institute Henrik Mohns Plass 1, 0371 Oslo https://www.met.no/

weatherapi-docs's People

Contributors

frankthomastveter avatar geira avatar havardf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

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.