Metadata Invalid YAML error for citations plugin

New user here. I assume I have set up something incorrectly but I can’t see what is wrong. When I preview the note I get the Invalid YAML message. And the Zotero link doesn’t work.
Here’s the output:

title: Conducting Research on the Internet : Online Survey Design , Development and Implementation Guidelines
authors: Dorine Andrews, Blair Nonnecke, Jennifer Preece
year: 2003
tags:
aliases:

zotero://select/items/@andrews2003ConductingResearchInternet

In my citation plugin template settings, I have:

title: {{title}}
authors: {{authorString}}
year: {{year}}
tags:
aliases:

{{zoteroSelectURI}}

Abstract

{{abstract}}

---
title: "Conducting Research on the Internet : Online Survey Design , Development and Implementation Guidelines"  
authors: "Dorine Andrews, Blair Nonnecke, Jennifer Preece"  
year: 2003  
tags:  
aliases:
- "zotero://select/items/@andrews2003ConductingResearchInternet"
---

It will render appropriately like this.

If the Zotero reference is an alias, it needs to be on the same line as the alias key or as shown. The en dash means it is a part of the alias key.
Also, if what you use has spaces, they need to be inside quotes, single or double.

Thanks. It does render with what you provided, but isn’t separated into separate lines. I need the title, authors, etc, each on a separate line. Also the Zotero link is still just a string of text, not a link. In the tutorials I’ve watched that should be a clickable link (in preview mode)

Also, what should I put in the template section?

I am still getting the Invalid YAML message - the following is my template:


title: {{title}}
authors: {{authorString}}
year: {{year}}

Abstract

{{abstract}}

Post a screenshot of source and preview mode. It may be more helpful to understand what you are seeing.

SOURCE:

PREVIEW:

Your YAML is being considered invalid because of the : character in your title. You’ll need to enclose it in quotations like @jwl showed in their example. Give that a test :slight_smile:

You mean the colon in the title of the paper, right? I removed the colon from the title and now that text disappears in preview mode (see below). Is that what is supposed to happen?
Sorry but I didn’t understand what you meant about enclosing it in quotations. Do you mean in the template? Or on each individual note? How should I edit the template? [I’m not familiar with working with code, please forgive me]
preview with no colon

Also, if I just delete the colon as a workaround, I am still left with the problem of Zotero links not showing as links.
What do I need to put in the Literature note content template so that the Zotero reference can display as a link in the note? When clicked it should bring me to Zotero right?

The issue has been resolved. I searched online for various permutations of the template code and I finally found one that seems to work on my system:

**Title:** {{title}}
**Authors:** {{authorString}}
**Year:** {{year}}
[See in Zotero]({{zoteroSelectURI}})
Tags:
##### Abstract
{{abstract}}

I don’t know why it works and the other ones didn’t, but if someone else has this issue, then try the template above. It might work for you.

Go to settings → editor → show frontmatter. If this is toggled off, the frontmatter will not show in preview mode. If the frontmatter is incorrectly formatted, as in your screenshot, it shows a warning. Once it is formatted correctly, it will not show unless you toggle it on in the settings.

2 Likes

Just a follow-up for anyone having the same issue with paper titles.

My template is now:

---
title: "{{title}}"
authors: {{authorString}}
year: {{year}}
---

with the " " around the brackets, and I’m not getting the error message anymore.

Hi Hurla64. Thank you so much for your sharing and this one really works WELL! Many thanks! And based on this I add some elements that I need. As following is my code:

**Title:** {{title}}
**Authors:** {{authorString}}
**Year:** {{year}}
**DOI:** {{DOI}}
[See in Zotero]({{zoteroSelectURI}})
Tags:

# Abstract
{{abstract}}

# Summary

  
# Research Objective(s)


# Background / Problem Statement


# Method(s)


# Evaluation


# Conclusion


# Notes


# References
2 Likes

Hi friends! Many thanks to Hurla64. I’ve made a template based on hurla64’s codes. I hope this can help. The issue mentioned in this discussion seemed so annoying for sure.

I have used quotation marks as recommended in the thread but it is not working for me. For instance

---
Title: "Data management and use: governance in the 21st century"
Authors: "The British Academy & The Royal Society"
Year: 2017
[See in Zotero](zotero://select/items/@DataManagementUse2017)
---

renders as

Invalid YAML

Title: "Data management and use: governance in the 21st century"
Authors: "The British Academy & The Royal Society"
Year: 2017
[See in Zotero](zotero://select/items/@DataManagementUse2017)
Tags:
  - gouvernance

Any idea what is wrong? I have Citations v0.4.5 with Obsidian v1.1.9. Thank you in advance.

Did you put “{{title}}” in the Citations plugin? In the setting called Literature note content template?

It works when I remove the square brackets, like this:

Title: "Data management and use: governance in the 21st century"
Authors: "The British Academy & The Royal Society"
Year: 2017
Zotero: zotero://select/items/@DataManagementUse2017
Tags:
  - gouvernance

The template looks like this:

---
Title: "{{title}}"
Authors: "{{authorString}}"
Year: {{year}}
Zotero: {{zoteroSelectURI}}
Tags:
  - 
---

Whatever works is what you should go with.