Hello World - My First Blog Post

Testing the new markdown-based blog system

Muhamad Fariz Farhan December 19, 2024 1 min read
Hello World - My First Blog Post

Hello World!

Welcome to my new blog powered by Goldmark and Go! This is a test post to demonstrate the new file-based blog system.

What's New?

This blog system features:

  • Markdown content with YAML frontmatter
  • File-based storage (no database required!)
  • Clean URLs generated from titles
  • GitHub Flavored Markdown support
  • Fast parsing with Goldmark

Code Example

Here's a simple Go function:

func main() {
    fmt.Println("Hello, World!")
}

// ParseReader implements Parser.ParseReader
func (p *GoldmarkParser) ParseReader(ctx context.Context, reader io.Reader, filename string) (*Document, error) {
	content, err := io.ReadAll(reader)
	if err != nil {
		return nil, &ParseError{
			Type:    ErrorIO,
			Message: "failed to read from reader",
			File:    filename,
			Err:     err,
		}
	}

	return p.ParseContent(ctx, content, filename)
}

Table Support

Feature Status Notes
Markdown Powered by Goldmark
Frontmatter YAML metadata
Code Highlighting Syntax highlighting
Tables GitHub Flavored Markdown

Task Lists

  • Implement markdown parser
  • Add frontmatter support
  • Create sample blog post
  • Integrate with blog handlers
  • Add template rendering

Conclusion

This new system is much simpler and more reliable than the previous SQLite-based approach. No more database corruption issues! 🎉

Happy blogging!

Muhamad Fariz Farhan

Muhamad Fariz Farhan

Introduction to the new file-based blog system built with Go and Goldmark

Enjoyed this post?

Share it with your network or follow me for more content!