Tag or shortcut for title with no spaces, or hyphen separated?

Is there a shortcut like [[safe_title]] that inserts the title hyphen separated? Also, is there a list of all tags somewhere?

There is a tag reference on the documentation site.

There is no equivalent that uses hyphens. Something like this is in script would do it:

let safeTitle = draft.processTemplate("[[safe_title]]");
let hyphenTitle = safeTitle.replace(" ", "-");
draft.setTemplateTag("hyphen_title", hyphenTitle);

Put that in a script step at the beginning of an action and subsequent steps would have access to a new [[hyphen_title]] tag.

1 Like

As a note, .replace will only replace the first space; to replace them all, update to this:

let safeTitle = draft.processTemplate("[[safe_title]]");
let hyphenTitle = safeTitle.replaceAll(" ", "-");
draft.setTemplateTag("hyphen_title", hyphenTitle);