Building with F# - A Technical TalkOctober 24, 2025Luis Quintanilla # Building with F# A practical guide to static site generation **Luis Quintanilla** October 2025 --- # Why F#? --- ## Key Benefits ### Developer Experience - Concise syntax - Type inference - Immutability by default - Pattern matching - Excellent tooling ### Production Ready - .NET ecosystem - Great performance - Strong typing - Cross-platform - Battle-tested --- ## Architecture Overview ### Core Components The static site generator uses a modular architecture: 1. **Content Processing** - Markdown parsing with custom blocks 2. **View Generation** - F# ViewEngine for type-safe HTML 3. **Build Pipeline** - Orchestrated content generation 4. **Asset Management** - CSS, JavaScript, and image optimization Each component is independently testable and follows functional programming principles. **Tech Stack:** - F# 9.0 - .NET 9 - Giraffe ViewEngine - Markdig - Reveal.js --- ## Code Example ### Implementation ```fsharp type Post = { Title: string Content: string Date: string Tags: string array } let renderPost post = article [] [ h1 [] [Text post.Title] div [] [rawText post.Content] ] ``` ### Output Clean, type-safe HTML generation using F#'s powerful type system and functional composition. **Benefits:** - Compile-time safety - No string concatenation - Composable views - Testable code --- ## Technology Stack  **F# 9.0**  **.NET 9**  **HTML5**  **CSS3**  **Markdown**  **Git** --- ## Before vs After ### Manual HTML - Error-prone strings - No type safety - Hard to maintain - Difficult testing - Fragile refactoring → ### F# ViewEngine - Type-safe views - Compile-time checks - Easy maintenance - Simple testing - Safe refactoring --- ## Build Process ### Three-Stage Pipeline 1. **Parse** - Read markdown files and extract metadata 2. **Process** - Transform content and generate HTML 3. **Output** - Write files and copy static assets Each stage is pure and composable, making the system easy to understand and extend. ---  ## System Architecture The generator follows a functional pipeline pattern: - Content flows through pure transformations - Each stage produces immutable data - Side effects isolated at boundaries - Highly testable and maintainable --- Make illegal states unrepresentable. — Yaron Minsky --- ## Implementation Steps ### Phase 1: Setup - Install F# SDK - Create project - Add dependencies - Setup tooling ### Phase 2: Build - Define types - Create parsers - Build generators - Write tests ### Phase 3: Deploy - Run builds - Verify output - Deploy site - Monitor performance --- ## Key Takeaways F# provides excellent tools for static site generation Type safety catches errors at compile time Functional programming leads to maintainable code **Ready to start building?** --- # Questions? --- # Thank You! **Contact:** hello@lqdev.me **GitHub:** github.com/lqdev **Website:** lqdev.me ResourcesF# Language GuideSample Code Repository