mirror of
https://github.com/cmorooney/obsidian-game-search-plugin.git
synced 2026-07-22 07:50:25 +00:00
updates README example template to reflect latest changes to how lists or complex objects get serialized
This commit is contained in:
parent
d860bb1a38
commit
39f58b0851
1 changed files with 17 additions and 13 deletions
30
README.md
30
README.md
|
|
@ -60,25 +60,29 @@ so that you can auto-generate content for your game notes.
|
|||
|
||||
### Example Template
|
||||
|
||||
The following is an example template. A complete list of template variables provided by the plugin
|
||||
can be found under [Template Variable Definitions](#template-variables-definitions).
|
||||
**Note**: Array properties will output as a comma separated string.
|
||||
The following is an example template.
|
||||
|
||||
```
|
||||
Note that including data from lists or
|
||||
complex objects may require templater to extract what you want
|
||||
(e.g `genres`, `platforms`, `stores`, `publishers`, `developers` in example template)
|
||||
|
||||
A complete list of template variables provided by the plugin
|
||||
can be found under [Template Variable Definitions](#template-variables-definitions).
|
||||
|
||||
```YAML
|
||||
---
|
||||
tag: Game 🎮
|
||||
genres: {{genres}}
|
||||
platforms: {{platforms}}
|
||||
tag: Game 🎮
|
||||
id: {{id}}
|
||||
genres: <%= {{genres}}.map(g => `${g.name}`) %>
|
||||
platforms: <%= {{platforms}}.map(p => `${p.platform.name}`) %>
|
||||
release_date: {{released}}
|
||||
background_image: {{background_image}}
|
||||
metacritic_score: {{metacritic}}
|
||||
stores: <%= {{stores}}.map(n => `${n.store.name}`) %>
|
||||
publishers: <%= {{publishers}}.map(p => `${p.name}`) %>
|
||||
developers: <%= {{developers}}.map(d => `${d.name}`) %>
|
||||
---
|
||||
|
||||

|
||||
|
||||
Genres: {{genres}}
|
||||
Release Date: {{released}}
|
||||
Publishers: {{publishers}}
|
||||
Developers: {{developers}}
|
||||
```
|
||||
|
||||
## Regenerating File Metadata
|
||||
|
|
|
|||
Loading…
Reference in a new issue