Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
(no ticket): [update] Email Templates, add edited versions (#1500)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Riehl authored Oct 16, 2023
1 parent 4500c3c commit ae0b8bd
Show file tree
Hide file tree
Showing 15 changed files with 2,724 additions and 0 deletions.
32 changes: 32 additions & 0 deletions models/email_templates/combined/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Email Template Objects

Object schemas for handlebars email templates.

## Directory structure

```shell
.
├── data # json data for generating and updating yaml schema
├── _all.yml # Groups models together for docs
├── account_details_changed_email.yml # Individual email template models
├── ...
```

## Updating models

To generate a new model from json data and overwrite the existing schema file:

1. Copy and paste template `data-*.json` from [localization-tools](https://github.com/bigcommerce/localization-tools/blob/master/email-check/modules/email-templates/types/abandoned_cart_email/data-0.json) to `models/_json/email_templates`.
2. Use `models/json2schema.py` to convert the json data to a yaml schema.

Example:

```bash
cat data.json | python json2schema.py > schema.yml
```

Bash for overwriting all email template models:

```bash
for f in models/email_templates/data/*.json; do cat $f | python models/json2schema.py > ${f%.*}.yml; mv ${f%.*}.yml models/email_templates/; done
```
Loading

0 comments on commit ae0b8bd

Please sign in to comment.