This function preserves the existing frontmatter formatting while adding the source field.
(content, source string)
| 169 | |
| 170 | // This function preserves the existing frontmatter formatting while adding the source field. |
| 171 | func addSourceToWorkflow(content, source string) (string, error) { |
| 172 | // Use shared frontmatter logic that preserves formatting |
| 173 | return addFieldToFrontmatter(content, "source", source, false) |
| 174 | } |
| 175 | |
| 176 | // addEngineToWorkflow adds or updates the engine field in the workflow's frontmatter. |
| 177 | // This function preserves the existing frontmatter formatting while setting the engine field. |