Not sure I fully understand the question but, tags in the YAML will not be recognized (will not appear in the sidebar) and will not be present in the PDF, JPG, DOCX, or ePub exports. The HTML exporter turns the YAML into tags.
If you want your tags to be excluded from exports I suggest checking the relative option in Preference > Generals.
Sorry there are two kinds of metadata. yaml frontmatter:
---
title: some title
---
and without - - -. Markdown metadata
title: some title
This markdown metadata after the first empty line. So when I place tags directly after the markdown metadata like in my example yesterday, they are considered to be part of the metadata.
I understand that you both call them yaml frontmatter, which then also answers my question.
Now I could answer the question myself:
Markdown metadata is just considered as normal text.
So if you put
title: some title
tags: #bear
in the front #bear is considered to be a tag. If exported to pdf, it is text and is not hidden.
However, if you export Bear-Markdown to other markdown editors this metadata is metadata and will not be rendered in the preview!
It can stay that way