From 8b6d621d7114eae73614e546d200cb8071b1af51 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Thu, 26 Sep 2024 20:30:31 +0200 Subject: [PATCH] 2551: Expanded new template documentation --- CHANGELOG.md | 3 +++ README.md | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d5ee9f..ef78342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] + +- [#158](https://github.com/os2display/display-templates/pull/158) + - Expanded documentation for new templates. - [#157](https://github.com/os2display/display-templates/pull/157) - Add Vimeo player template. - [#156](https://github.com/os2display/display-templates/pull/156) diff --git a/README.md b/README.md index e057727..febe508 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,11 @@ The docker setup serves the files in the `build/` (see build for production) fol ## Add a new template To add a template: + * Create a folder in src with the name of the template, e.g. `my-template` that contains the following files: * `my-template.js` - The React component to render. - * `my-template.json` - The file describing the where to find the files required for the template. - * `my-template-dev.json` - The file describing the where to find the files required for the template in a dev context. + * `my-template.config.json` - The file describing the where to find the files required for the template. * `my-template-admin.json` - The file describing the content interface for populating the template. - * `my-template-content-example.json` - An example content. - * `my-template-schema.json` - Json Schema description of the content for the slide. Add one or more entries to `src/slides.js` with examples of the data required for the template. @@ -44,6 +42,9 @@ Add it to `const entry = {}`: } ``` +Running the build script will build all templates and set new timestamps in the config json files. +Only add the files relating to the new template to git. + ## Build for production. To build the templates for production