shredbx logo
shredbx shredbx shredbx shredbx Personal
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
AClaude
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
Andrei Solovev
Packages
Search packages... ⌘K
  • Data & Persistence
    • Databases 3
    • Object Storage 1
    • File Formats 2
    • Enumerations 2
    • Content 1
    • Codegen 2
  • System Integration
    • Secrets 1
    • CLI Tools 5
    • Media Processing 2
    • Adapters 2
  • UI & Components
    • Primitives 1
    • Blocks 1
    • Sections & Layouts 1
    • Entities 1
    • Media 1
    • Utilities 1
    • State & Presenter 1
    • Branding & Style 1
  • Game Engine
    • Framework 1
    • Engine 2
    • Presets 1
    • Vendor 1
Packages/ Data & Persistence/ Content/ Document
Go Package

document

Structured document model — markdown rendering, frontmatter, content blocks

Go Ready MD
Document Parsing go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
doc, err := document.Parse(file)

// Access typed frontmatter
title := doc.Frontmatter.Get("title")   // "Architecture Overview"
tags := doc.Frontmatter.GetSlice("tags") // ["architecture", "design"]

// Iterate content blocks
for _, block := range doc.Blocks {
    switch block.Type {
    case document.HeadingBlock:
        fmt.Printf("H%d: %s\n", block.Level, block.Text)
    case document.CodeBlock:
        fmt.Printf("Code (%s): %d lines\n", block.Language, block.LineCount)
    }
}

// Render to HTML
html, err := doc.Render()

About

Parses structured documents with YAML frontmatter and markdown body into typed content blocks. Supports rendering to HTML, extracting headings for table-of-contents generation, and block-level content manipulation.

Public API

NameKindSignature
Documenttypetype Document struct
Parsefuncfunc Parse(r io.Reader) (*Document, error)
Renderfuncfunc (d *Document) Render() (string, error)
Blocktypetype Block struct
Frontmattertypetype Frontmatter struct

Related Packages

config Go Ready

YAML configuration reader — typed config loading with environment overlay

yamlconfigurationenvironmenttyped-config
4 exports 4 deps

Source

github.com/shredbx/sbx-core/pkg/document
markdownfrontmattercontent-blocksrendering
shredbx logo shredbx shredbx shredbx shredbx Andrei Solovev

Solution Architect & Lead Software Engineer

ExperiencePortfolioResearch & ExperimentsEducationCertificationSkills
GitHub ↗LinkedIn ↗Email ↗
AVAILABLE FOR NEW PROJECTS
// MY LATEST BEATS
Hobby & Interests

Lab

  • The Lab
  • Framework
  • Components
  • Packages
  • Games
  • Process (SDLC)
  • Knowledge
  • Blog

Andrei

  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
  • Lifestyle

Team

  • Team
  • Andrei
  • Claude

Legal

  • Privacy
  • Terms
  • Cookies
© 2026 shredbx.com. All rights reserved. — Andrei Solovev |