Skip to content

Conversation

@vanmarkic
Copy link

Summary

  • Fixes error when templates don't include frontmatter tags
  • Makes frontmatter.tags optional in template processing
  • Includes comprehensive test coverage

Changes

  • Updated template execution to handle missing tags gracefully
  • Added tests for templates with and without frontmatter tags
  • Ensures backward compatibility with existing templates

Related Issue

Fixes bug #41

🤖 Generated with Claude Code

…ev#41)

The execute_template function was failing when templates lacked a tags field in their YAML frontmatter, returning "frontmatter.tags must be an array (was null)". This change makes the tags field optional in ApiVaultFileResponse, aligning with standard Obsidian template practices where tags are not required.

Fixes jacksteamdev#41
…jacksteamdev#41)

- Test vault file response with tags array
- Test vault file response without tags (optional)
- Test vault file response without description (optional)
- Test vault file response with empty frontmatter
- Test vault file response with empty tags array
- Test rejection of tags as non-array type
- Test rejection of tags with non-string elements
- Test required fields (content, path, stat)
- Test typical Obsidian frontmatter structures
- Test Templater templates without tags
@netlify
Copy link

netlify bot commented Nov 15, 2025

Deploy Preview for superb-starlight-b5acb5 canceled.

Name Link
🔨 Latest commit 60b3495
🔍 Latest deploy log https://app.netlify.com/projects/superb-starlight-b5acb5/deploys/6918c1e7020e700008769865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants