Skip to content

How to set a title per note so the Obsidian Graph looks nice? #645

Closed Answered by r00t3dd
UberChili asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @UberChili, you can achieve this by adding note_path_func callback in your obsidian.nvim settings. For example:

      -- Optional, customize how note file names are generated given the ID, target directory, and title.
      ---@param spec { id: string, dir: obsidian.Path, title: string|? }
      ---@return string|obsidian.Path The full path to the new note.
      note_path_func = function(spec)
        -- This is equivalent to the default behavior.
        local path = spec.dir / tostring(spec.id) .. "+" .. tostring(spec.title)
        return path:with_suffix(".md")
      end,

-- Optional, customize how note file names are genera…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@UberChili
Comment options

Answer selected by UberChili
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants