<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Terry Zhao</title>
    <description>The latest articles on DEV Community by Terry Zhao (@terryzhao).</description>
    <link>https://dev.to/terryzhao</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4097639%2Fc5d92f63-480a-4d73-a685-c9affda4402d.png</url>
      <title>DEV Community: Terry Zhao</title>
      <link>https://dev.to/terryzhao</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/terryzhao"/>
    <language>en</language>
    <item>
      <title>I Got Tired of Broken YAML Front Matter in Obsidian — So I Built a No-Upload Fixer</title>
      <dc:creator>Terry Zhao</dc:creator>
      <pubDate>Thu, 27 Aug 2026 14:34:37 +0000</pubDate>
      <link>https://dev.to/terryzhao/i-got-tired-of-broken-yaml-front-matter-in-obsidian-so-i-built-a-no-upload-fixer-5dij</link>
      <guid>https://dev.to/terryzhao/i-got-tired-of-broken-yaml-front-matter-in-obsidian-so-i-built-a-no-upload-fixer-5dij</guid>
      <description>&lt;p&gt;If you use Obsidian, Hugo, or Jekyll, you've probably seen this error:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;YAML front matter parsing error: ...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It usually shows up right when you need the note most. And the worst part? The error message tells you &lt;em&gt;something&lt;/em&gt; is wrong, but rarely &lt;em&gt;where&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three mistakes I kept making
&lt;/h2&gt;

&lt;p&gt;After way too many broken notes, I noticed the same culprits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Tabs instead of spaces.&lt;/strong&gt; YAML forbids tabs for indentation. One pasted tab and the whole block fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A missing closing &lt;code&gt;---&lt;/code&gt;.&lt;/strong&gt; You open front matter and forget to close it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unquoted &lt;code&gt;yes&lt;/code&gt; / &lt;code&gt;no&lt;/code&gt; / numbers like &lt;code&gt;007&lt;/code&gt;.&lt;/strong&gt; YAML silently turns &lt;code&gt;yes&lt;/code&gt; into &lt;code&gt;true&lt;/code&gt; and &lt;code&gt;007&lt;/code&gt; into &lt;code&gt;7&lt;/code&gt;. For Obsidian tags or version fields, that's a silent data change.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;(There's a longer catalog of these at &lt;a href="https://yamltoolbox.com/yaml-errors.html" rel="noopener noreferrer"&gt;yamltoolbox.com/yaml-errors&lt;/a&gt; if you want the full list.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I didn't want to paste my notes into "just any" validator
&lt;/h2&gt;

&lt;p&gt;Most online YAML validators ask you to paste your content into &lt;em&gt;their&lt;/em&gt; server. For a config file that's fine. For private Obsidian notes — reading lists, daily journals, work-in-progress — I didn't love the idea.&lt;/p&gt;

&lt;p&gt;So I built one that runs &lt;strong&gt;100% in the browser&lt;/strong&gt;. Nothing is uploaded. You paste the note, it checks only the &lt;code&gt;---&lt;/code&gt; block (so the Markdown body never causes false errors), and shows the exact broken line.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://yamltoolbox.com/frontmatter-validator-fixer.html" rel="noopener noreferrer"&gt;YAML Frontmatter Validator &amp;amp; Fixer&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What "fix" actually does
&lt;/h2&gt;

&lt;p&gt;It doesn't rewrite your note into something clever. It does the conservative stuff:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;adds the missing closing &lt;code&gt;---&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;trims trailing whitespace that breaks parsing&lt;/li&gt;
&lt;li&gt;quotes &lt;code&gt;yes&lt;/code&gt; / &lt;code&gt;no&lt;/code&gt; / &lt;code&gt;007&lt;/code&gt; so they stay strings&lt;/li&gt;
&lt;li&gt;reports every change it made, line by line&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;My Note&lt;/span&gt;
&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;a, b&lt;/span&gt;
&lt;span class="na"&gt;draft&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yes&lt;/span&gt;

&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;My Note&lt;/span&gt;
&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;a&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;b&lt;/span&gt;
&lt;span class="na"&gt;draft&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;yes"&lt;/span&gt;

&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The draft field stays "yes" instead of becoming a boolean. Small thing, but it's the difference between a note that renders and one that doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validate the rest of your YAML too
&lt;/h2&gt;

&lt;p&gt;The same no-upload rule applies to the plain &lt;a href="https://yamltoolbox.com/yaml-validator.html" rel="noopener noreferrer"&gt;YAML Validator&lt;/a&gt; — handy right before you commit a GitHub Actions or Docker Compose file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I'm writing this
&lt;/h2&gt;

&lt;p&gt;Third-party write-ups get cited far more than your own site does. I'm not claiming this is the only fixer out there — but if you've lost an afternoon to a missing ---, it might save you the next one.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>webdev</category>
      <category>obsidian</category>
      <category>yaml</category>
    </item>
  </channel>
</rss>
