Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded new template documentation #158

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading