--- title: Hello, Blog World! date: 2024-06-10 author: Josephine Pfeiffer tags: [blog, introduction, markdown, static-site, containers] description: The inaugural post for my new blog --- # Hello, Blog World! After years of publishing on various platforms, I've come full circle and set up a self-hosted blog again! This inaugural post explains why I made the switch and how I built this site. ## Why Medium Isn't Great for Readers Medium started with good intentions, but it's become increasingly hostile to readers. The constant nag walls asking for subscriptions interrupt the reading experience. Their aggressive email marketing tactics and the limited number of "free" articles create artificial scarcity for content that I want to be freely accessible. Even worse, Medium's reading experience has deteriorated with floating sidebars, sticky headers, and pop-ups that take up valuable screen real estate. The platform prioritizes its monetization strategy over reader comfort, resulting in slow page loads filled with tracking scripts and analytics. When readers visit a technical blog, they want the content -- not a battle with the UI. ## The Migration Migrating my blog was also a convenient chance to evaluate my existing content. Some posts have aged poorly and some simply don't meet my quality standards anymore. Each article that made it to this blog has been reviewed, updated where necessary, and deemed worthy of preservation. It's liberating to leave behind content that no longer serves its purpose and focus on what truly matters. ## The Technical Setup ![Blog Architecture - A simple diagram showing the blog's technical structure](/blog/images/blog-architecture.png) ### Markdown + Pandoc: Content-First Approach The foundation of this blog is straightforward: content is written in Markdown files, which are then converted to HTML using Pandoc. This approach keeps the focus on writing rather than wrestling with formatting. The separation of content from presentation means I can update the site's design without touching the articles themselves. Markdown strikes the perfect balance between readability in its raw form and flexibility for presentation. I can include code blocks with syntax highlighting, images with captions, and mathematical formulas when needed—all without leaving the comfort of plain text. ### Multi-Stage Container Build I've set up a multi-stage Docker build that handles the conversion process efficiently: 1. The first stage installs Pandoc and all dependencies 2. The second stage takes the Markdown files and converts them to HTML 3. The final stage creates a minimal Nginx image that serves the static files This approach results in a tiny production container that's secure and fast to deploy. The entire build process is defined in a Dockerfile, making it reproducible and portable. ### Pre-Commit Hooks Instead of CI Pipelines Rather than setting up complex CI/CD pipelines, I've implemented pre-commit hooks that validate and format content before it's committed. These hooks: - Check for broken links - Validate Markdown syntax - Ensure frontmatter is correctly formatted - Run a spell checker to catch obvious typos - Optimize images to keep page load times fast This catches issues early and ensures the repository always contains publish-ready content. It's much simpler than waiting for a pipeline to fail after pushing changes. ### The Beauty of Static The final output is a completely static site—no database, no server-side processing, and no dynamic content generation. This approach has several advantages: - Lightning-fast page loads - Excellent security profile (no attack surface) - Easy deployment (it's just files) - Minimal hosting requirements - Perfect caching behavior Since everything is version-controlled, I have a complete history of changes and can easily roll back if needed. The site can be deployed anywhere that can serve files—from a standard web server to object storage like S3 or even GitHub Pages. ## Looking Forward This setup gives me complete control while keeping things refreshingly simple. No fighting with CMS quirks, no database migrations, and no dependency hell—just content and code, both handled elegantly. In upcoming posts, I'll be sharing technical explorations, security research, and thoughts on building better systems. With this new platform, I can focus on what matters most: writing useful content that respects your time and attention. Welcome to my blog—I hope you'll find something valuable here.