devidw / obsidian-to-hugo

Process Obsidian notes to publish them with Hugo. Supports transformation of Obsidian wiki links into Hugo shortcodes for internal linking.
https://obsidian-to-hugo.wolf.gdn
MIT License
316 stars 22 forks source link

Feature request: clean up YAML frontmatter to fit Hugo requirements #1

Closed benbohmer closed 2 years ago

benbohmer commented 2 years ago

Obsidian allows tags: [tag1, tag2, tag3]

Hugo seems to only accept tags:

Could we check for this and modify accordingly?

devidw commented 2 years ago

@benbohmer thanks creating this issue.

If you have problems migrating the tags, it should be possible to use the array syntax with square brackets inside TOML frontmatter, which should definitely work for Hugo, but I am not sure if Obsidian supports it as well:

+++
…
tags = ['.vimrc', 'plugins', 'spf13-vim', 'vim']
…
+++

…

See https://gohugo.io/content-management/front-matter/#example


However, you should be able to use the listed array syntax in Obsidians YAML frontmatter as well:

---
…
tags:
- four
- five
- six
…
---

…

See https://help.obsidian.md/Advanced+topics/YAML+front+matter