Skip to content

Latest commit

 

History

History
91 lines (64 loc) · 2.68 KB

README.md

File metadata and controls

91 lines (64 loc) · 2.68 KB

Templates

Use-case-specific community templates

This repository contains example templates for various use cases, for and by the Fiberplane community.

Do you have a template to share? Please see CONTRIBUTING.md for more information.

Overview

Fiberplane Templates are built with the Jsonnet data templating language.

Are you looking for our template engine? It is hosted in our shared fiberplane repository.

Quickstart

The Fiberplane CLI is the recommended way to interact with templates (see the docs or run fp help templates).

Structure of a Template

Most Fiberplane Templates export a Jsonnet function that accepts some parameters and creates a notebook using the helper functions provided by the Fiberplane Jsonnet library.

local fp = import 'fiberplane.libsonnet';
local c = fp.cell;
local fmt = fp.format;

// Parameters are named and can have default values
function(incidentName='API Outage')
  fp.notebook
    .new('Incident Response for: ' + incidentName)
    .setTimeRangeRelative(minutes=60)
    .addCells([
      // The library exposes helper functions for creating every cell type
      c.h1('Heading'),
      c.text(
        // There are also helper functions for formatting text
        fmt.bold('Hello World!')
      )
    ])

Example Templates

Want to contribute or request a template for another use case? Open an issue!

Template API

Please see our Template API Reference.

Getting Help

Please see COMMUNITY.md for ways to reach out to us.

Contributing

See CONTRIBUTING.md.

Code of Conduct

See CODE_OF_CONDUCT.md.

License

Our templates are distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT.