Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

dataset-site-template

About

This repository contains a mustache template for creating an OpenActive dataset site, similar to those that can be found at https://status.openactive.io.

It is designed to be embedded in a booking system, and easily customised.

Getting started

Please see here for full documentation: https://developer.openactive.io/publishing-data/dataset-sites

Important notes for production use

  • DO NOT DOWNLOAD THE MUSTACHE FILE LIVE, IT MUST BE SAVED LOCALLY TO PREVENT XSS ATTACKS
  • DO NOT RENDER THIS FILE CLIENT-SIDE, IT MUST BE RENDERED SERVER-SIDE FOR SEO

Usage

Simply construct the JSON-LD found in example.json based on your organisation (for single database systems) or your customers' own properties (for multiple database systems), then process it with the following steps.

Steps to render the template:

  1. Stringify the input JSON, and place the contents of the string within the "json" property at the root of the JSON itself.
    • This is important as it is used to populate the machine-readable <script type="application/ld+json"> tag within the generated HTML - view the source of this page to see an example.
  2. Use the resulting JSON with the mustache template to render the dataset site.

Examples

C# .NET

This library contains helpers that handle the above automatically. This repository contains example rendering logic example written in C#.

JavaScript

This sample contains a full example written in JavaScript.

About

Templates for creating a dataset site

Topics

Resources

License

Releases

No releases published

Packages

No packages published