<?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>Forem: Javier Ramírez</title>
    <description>The latest articles on Forem by Javier Ramírez (@javier_ramrez_e2b4bb54fb).</description>
    <link>https://forem.com/javier_ramrez_e2b4bb54fb</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3822608%2Ffb33b05c-7424-4144-b018-0f937d68edb1.png</url>
      <title>Forem: Javier Ramírez</title>
      <link>https://forem.com/javier_ramrez_e2b4bb54fb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/javier_ramrez_e2b4bb54fb"/>
    <language>en</language>
    <item>
      <title>Turning Markdown Files into a Queryable Knowledge Graph</title>
      <dc:creator>Javier Ramírez</dc:creator>
      <pubDate>Fri, 13 Mar 2026 15:57:51 +0000</pubDate>
      <link>https://forem.com/javier_ramrez_e2b4bb54fb/turning-markdown-files-into-a-queryable-knowledge-graph-4aho</link>
      <guid>https://forem.com/javier_ramrez_e2b4bb54fb/turning-markdown-files-into-a-queryable-knowledge-graph-4aho</guid>
      <description>&lt;p&gt;Markdown files often contain more structure than we give them credit for.&lt;/p&gt;

&lt;p&gt;With YAML frontmatter and consistent links, a collection of Markdown files can behave like a small knowledge graph.&lt;/p&gt;

&lt;p&gt;Many people already use YAML frontmatter to store metadata:&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;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mission-klendathu&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mission&lt;/span&gt;
&lt;span class="na"&gt;commander&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[[&lt;/span&gt;&lt;span class="nv"&gt;johnny-rico&lt;/span&gt;&lt;span class="pi"&gt;]]&lt;/span&gt;
&lt;span class="na"&gt;date&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2297-08-01&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once files have consistent IDs and links between them, something interesting happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;files become nodes&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;[[links]] become relations&lt;/li&gt;
&lt;li&gt;the collection of files becomes a graph&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Querying Markdown
&lt;/h2&gt;

&lt;p&gt;One approach is to define queries directly inside Markdown files.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you can query that graph, Markdown stops being just documents — it becomes &lt;strong&gt;structured data&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;!view mission where commander = [[johnny-rico]]&lt;br&gt;
select date, outcome&lt;br&gt;
sort date desc&lt;/p&gt;

&lt;p&gt;The query runs over all Markdown files and returns matching nodes.&lt;/p&gt;

&lt;p&gt;In my case, I tried building a VS Code extension to explore this idea.&lt;/p&gt;

&lt;h2&gt;
  
  
  Live Query Results
&lt;/h2&gt;

&lt;p&gt;!view queries render results as tables inside the editor.&lt;/p&gt;

&lt;p&gt;You can edit values directly in the table, and the changes write back to the YAML frontmatter of the source file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F699ctpyjcswy1pxkndgn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F699ctpyjcswy1pxkndgn.gif" alt="Live query table in VS Code with inline editing of YAML frontmatter" width="760" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Markdown?
&lt;/h2&gt;

&lt;p&gt;Yamlink&lt;/p&gt;

&lt;p&gt;The goal is to keep everything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;local-first&lt;/li&gt;
&lt;li&gt;Git-native&lt;/li&gt;
&lt;li&gt;plain Markdown&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No database, no lock-in — just structured files.&lt;/p&gt;




&lt;h2&gt;
  
  
  Yamlink
&lt;/h2&gt;

&lt;p&gt;To explore this idea, I built a VS Code extension called &lt;strong&gt;Yamlink&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you're curious:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/javierigaciorm/yamlink" rel="noopener noreferrer"&gt;https://github.com/javierigaciorm/yamlink&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;VS Code Marketplace: &lt;a href="https://marketplace.visualstudio.com/items?itemName=yamlink.yamlink" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=yamlink.yamlink&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm especially interested in hearing how others are working with structured data in Markdown.&lt;/p&gt;

</description>
      <category>markdown</category>
      <category>vscode</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
