Skip to content

Commit

Permalink
Merge pull request #158 from os2display/feature/docs-new-template
Browse files Browse the repository at this point in the history
Expanded new template documentation
  • Loading branch information
tuj authored Oct 6, 2024
2 parents 851e0b6 + 8b6d621 commit 136442c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand Down

0 comments on commit 136442c

Please sign in to comment.