Hello, World

2026-04-20 143 words1 min read metago

Welcome to my portfolio blog. This site is generated by a static site generator I wrote in Go as a learning project.

Why Go?

I wanted to learn Go by building something real rather than following a tutorial. A static site generator hits a good set of concepts:

  • File I/O and directory walking
  • Struct design and YAML parsing
  • Third-party packages (goldmark for Markdown)
  • Go's html/template for safe HTML generation

How it works

The generator reads Markdown files from content/, parses YAML frontmatter (title, date, tags), converts the body to HTML, and injects everything into templates. Output lands in public/, which is served by GitHub Pages.

// Walk content directory, parse each file
filepath.WalkDir("content", func(path string, d fs.DirEntry, err error) error {
    if filepath.Ext(path) == ".md" {
        return processFile(path)
    }
    return nil
})

More posts soon.