Skip to content

Some metadata set in _metadata.yml and in YAML header inside document are not correctly merged.  #9864

Open
@cderv

Description

@cderv

Discussed in #9855

Originally posted by McKabue June 3, 2024

/posts/welcome/index.qmd

---
title: "Welcome To My Blog"
date: "2024-05-01"
categories: [news]
author: "martin from welcome"
---

This is the first post in a Quarto blog. Welcome!

![](thumbnail.jpg)

Since this post doesn't specify an explicit `image`, the first image in the post will be used in the listing page of posts.

/posts/_metadata.yml

categories: [tech]
author:
  - name: James from posts

With the above setup, I get the following post and listing:

Screenshot 2024-06-03 at 22 21 52 Screenshot 2024-06-03 at 22 22 14

However, if:

/posts/welcome/index.qmd

---
title: "Welcome To My Blog"
date: "2024-05-01"
---

This is the first post in a Quarto blog. Welcome!

![](thumbnail.jpg)

Since this post doesn't specify an explicit `image`, the first image in the post will be used in the listing page of posts.

/posts/welcome/_metadata.yml

categories: [news]
author: "martin from welcome"

/posts/_metadata.yml

categories: [tech]
author:
  - name: James from posts

I get the following post and listing:

Screenshot 2024-06-03 at 22 25 43 Screenshot 2024-06-03 at 22 25 54

When the metadata is in the document file, it overwrites all parent metadata such as authors and categories instead of extending it in the post page.

Metadata

Metadata

Assignees

Labels

authorsIssues related to author/affiliation normalizationbugSomething isn't workingyaml-validationIssues with YAML validation and autocompletion in quarto

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions