Skip to content

v4.5.0

Choose a tag to compare

@LebCit LebCit released this 13 Apr 15:13
· 7 commits to main since this release

LiteNode v4.5.0 Release – Advanced Frontmatter & Markdown Parsing

I'm thrilled to introduce major upgrades to SMP (Static Markdown Parser), LiteNode’s built-in markdown engine, now supporting complex frontmatter structures with effortless parsing!


New Capabilities Example

With the enhanced FrontmatterParser, you can now handle deeply nested frontmatter like this:

---
categories:
    - Development
    - Parsing
    - Docs
id: "1744396133932"
title: Documentation
slug: documentation
status: published
author:
    name: Alice
    hobbies: [read, swim, travel]  # Mixed array syntax
    age: 30                      # Auto number conversion
    skills: ["Markdown", "JS"]   # Quoted strings
    loves: Cats
    achievements:
        - Oops, it worked!
        - Fixed it. No idea how?
        - Blamed the intern. She is the intern!
tags: [js, yaml, node]           # Simple arrays
dates:
    createdAt: "2025-04-11T18:28:53.932Z"  # Auto Date parsing
    updatedAt: 2025-04-12T14:12:07.086Z    # Unquoted ISO dates
featuredImage:
    url: /images/sea.jpg         # Nested objects
    alt: ""                      # Empty string handling
---

Key Improvements:
Nested Objects
Mixed Arrays (bracket [a, b] and hyphen - a syntax)
Auto-Type Conversion (numbers, dates, booleans)
Robust String Handling (quoted/unquoted, empty values)
Deep Indentation Support (for readability)


🚀 Why Upgrade?

  • No More Workarounds – Parse complex metadata without manual preprocessing.
  • Strict Yet Flexible – Handles edge cases (e.g., mixed quotes, trailing commas).
  • Faster Debugging – Detailed errors with line numbers for malformed YAML.
npm install litenode@4.5.0

🔍 Under the Hood

  • Rewritten FrontmatterParser with indentation-aware parsing.
  • New NestedStack class for hierarchical state management.
  • 100% backward-compatible – your existing markdown files keep working!

I appreciate your feedback and contributions - enjoy the new features!