setFrontmatter
Sets the front matter of a given content string.
Import:
import { setFrontmatter } from 'obsidian-dev-utils/obsidian/frontmatter';Signature:
function setFrontmatter(content: string, newFrontmatter: object): stringParameters:
| Parameter | Type | Description |
|---|---|---|
content | string | The content string to set the front matter in. |
newFrontmatter | object | The new front matter to set. |
Returns: string — The new content string with the front matter set.