Hello, World
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 (
goldmarkfor Markdown) - Go's
html/templatefor 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.