obsidian-filename-heading-sync icon indicating copy to clipboard operation
obsidian-filename-heading-sync copied to clipboard

Feature Request: Add option to sync title field in the frontmatter yaml

Open jskherman opened this issue 1 year ago • 6 comments

Feature Request: Would it be possible to add an option to the plugin to both rename the heading and the frontmatter title at the same time? And leave the rest of the frontmatter unchanged?

Something like:

---
id: 20221103121801
title: "Title of the note here to be synced"
aliases: "Something else"
tags: 
  - tag1
  - tag2
---

# Title of the note here to be synced

Curabitur blandit tempus ardua ridiculus sed magna.
Sed haec quis possit intrepidus aestimare tellus.

This would immensely help in the use case where the markdown file is required to have this title field like for use in static site generators like Hugo or Jekyll. I tried having a look with the code but unfortunately, I don't have enough knowledge of Typescript to be effective yet. Thanks.

jskherman avatar Nov 03 '22 04:11 jskherman

A "replace all occurrences of the heading" option could be something to consider

dvcrn avatar Nov 03 '22 05:11 dvcrn

That would also be good way to go about it, yes.

jskherman avatar Nov 03 '22 07:11 jskherman

I would love to see this feature happening as well, but ideally with an option to disable filename syncing. I personally use UUIDs as file names like many zettelkasten users, and having a title field is mandatory for many obsidian features. Thanks for considering.

lyndhurst avatar Apr 14 '23 12:04 lyndhurst

I started working on this with the use case I'm interested in most (replacing heading ⇿ filename with front matter ⇿ filename). #71

bvolkmer avatar May 10 '23 15:05 bvolkmer

I have a working solution in PR #74. As it consists of refactoring and some changes of asynchronous behavior, use with caution. But testing is appreciated.

bvolkmer avatar Jun 01 '23 15:06 bvolkmer

Thanks Thanks for catching up on this! I'll try to take a look!

Feel free to un-draft it if you think it's ready for review

dvcrn avatar Jun 02 '23 05:06 dvcrn