Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 1 column 2
---
{% if attachments -%}
PDF:
{%- for attachment in attachments | filterby("title", "endswith", ".pdf")%}
- "[[{{ attachment.title }}]]"
{%- endfor %}
{%- endif %}
{% if accessDate -%}
accessDate: {{ accessDate | format('YYYY-MM-DD') }}
{%- endif %}
{% if allTags %}
allTags:
{%- for tag in allTags %}
- "{{ tag }}"
{%- endfor %}
{%- endif %}
{% if authors -%}
authors:
{%- for author in authors.split(", ") %}
- "[[{{author}}]]"
{%- endfor %}
{%- endif %}
bibliography: "{{ bibliography }}"
citekey: "{{ citekey }}"
date: {{ date | format('YYYY-MM-DD') }}
dateAdded: {{ dateAdded | format('YYYY-MM-DD') }}
dateModified: {{ dateModified | format('YYYY-MM-DD') }}
desktopURI: "{{ desktopURI }}"
exportDate: {{ exportDate | format('YYYY-MM-DD') }}
extra: "{{ extra | replace('\n', ' ') }}"
importDate: {{ importDate | format('YYYY-MM-DD') }}
isFirstImport: {{ isFirstImport }}
itemID: "{{ itemID }}"
itemKey: "{{ itemKey }}"
itemType: "{{ itemType }}"
key: "{{ key }}"
lastExportDate: {{ lastExportDate | format('YYYY-MM-DD') }}
lastImportDate: {{ lastImportDate | format('YYYY-MM-DD') }}
libraryCatalog: "{{ libraryCatalog }}"
libraryID: "{{ libraryID }}"
select: "{{ select }}"
title: "{{ title }}"
uri: "{{ uri }}"
url: "{{ url }}"
version: "{{ version }}"
year: {{date | format("YYYY")}}
shortAuthor: {% set n_authors = 0 -%}{%- for creator in creators -%}{%- if creator.creatorType == "author" -%}{%- set n_authors = n_authors + 1 -%}{%- endif -%}{%- endfor -%}{%- if n_authors == 1-%}{%- set authorString = creators[0].lastName -%}{%- elif n_authors == 2 -%}{%- set authorString = creators[0].lastName + " & " + creators[1].lastName -%}{%- else -%}{%- set authorString = creators[0].lastName + " et al." -%}{%- endif -%}"{{authorString}}"
formattedTitle: "{{title}} ({{authorString}}, {{date | format("YYYY")}})"
citet: "{{authorString}} ({{date | format("YYYY")}})"
citep: "({{authorString}}, {{date | format("YYYY")}})"
aliases:
- "{{title}} ({{authorString}}, {{date | format("YYYY")}})"
- "{{authorString}} ({{date | format("YYYY")}})"
- "({{authorString}}, {{date | format("YYYY")}})"
---
{% if hashTags -%} {%- for tag in hashTags.split(', ') -%} {{ tag | replace('---', '/') }}{{ " " }} {%- endfor %}
{% endif -%}
PDF: dv:this.PDF
{% if abstractNote -%}
[!abstract]+ {{ abstractNote | replace("\n", " ") }} ^abstract {% endif %}
{% persist "note" %}
{% endpersist %}
This is my template for the Obsidian Zotero Integration plugin.
A few notes:
~/Zotero/storage
under the root of my vault so that all PDFs can be accessed from within Obsidian.dv:
.