Back to Blog

Building This Blog (And the Chaos That Came With It)

Building This Blog (And the Chaos That Came With It)

So this is my first proper blog post. Fitting that it's about building the blog itself.

What I Actually Did Tonight

Built a complete blog system for my portfolio site. Database, models, controllers, views, routing, markdown parsing - the works. Then decided it looked boring, so I redesigned it. Then the sidebar broke. Then I fixed it. Then I made it mobile responsive. Then I added an entire admin panel with authentication and CRUD operations.

Eight hours. One evening. Too much caffeine.

The Technical Bits

What I built:

  • Posts stored in MySQL with title, slug, excerpt, content, timestamps
  • Eloquent model with scope for published posts
  • BlogController handling list + individual post views
  • CommonMark for markdown parsing
  • Blade layouts with @extends and @yield
  • Sidebar that pulls recent posts from the database
  • Admin panel with Laravel Breeze auth
  • Full CRUD operations for posts
  • Mobile-responsive design

Stack:

  • Laravel 12
  • PHP 8.3
  • MySQL
  • Deployed on Hetzner VPS (€4.51/month)
  • Nginx + SSL via Let's Encrypt

The Actual Problems

Problem 1: Script Tags Inside Script Tags

Had the sidebar toggle arrow showing on pages where it shouldn't. Spent ages trying to hide it with CSS. Didn't work.

Turns out I'd nested a @section('scripts') inside @section('content'). Laravel renders this as two script tags which browsers don't like.

Fixed it by making the sections siblings instead of nested. Obvious in hindsight.

Problem 2: Two Scrollbars Right Next To Each Other

Sidebar had a scrollbar. Main content had a scrollbar. Both visible. Both right next to each other. Looked terrible.

Solution: Hide the sidebar scrollbar but keep scroll functionality:

.blog-aside-content {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.blog-aside-content::-webkit-scrollbar {
    display: none; /* Chrome */
}

Still works with mouse wheel and trackpad. Just not visually competing.

Problem 3: Cache

Changed CSS. Refreshed. No change. Changed it again. Still nothing.

Had to:

  • Close all browser tabs
  • php artisan cache:clear
  • php artisan view:clear
  • php artisan config:clear
  • Open incognito window

Then it worked.

Problem 4: The Cards Looked Generic

Blog cards worked but looked... fine. Boring. Generic.

Redesigned them with:

  • Borders that change color on hover
  • Gradient left accent bar (3px wide)
  • translateX(-2px) slide animation
  • Shadow effects
  • Better typography with proper line-height
  • Uppercase timestamps with letter-spacing and a border-top separator

Went from "yeah it works" to "actually looks good".

The Admin Panel

Built it because manually adding posts via tinker gets old fast.

Features:

  • Login system (Laravel Breeze)
  • Middleware protecting admin routes (IsAdmin checks email)
  • Dashboard showing all posts with status badges
  • Create/edit/delete operations
  • Markdown preview in forms
  • Publish scheduling with datetime picker
  • Mobile responsive tables

Took longer than expected. Worth it.

What This Taught Me

Technical:

  • Blade section inheritance matters
  • CSS specificity fights are solvable with z-index
  • Cache clearing is not optional when testing CSS/JS changes
  • Mobile-first design requires thinking at different breakpoints
  • Middleware is powerful for access control

Soft Skills:

  • Building beats planning
  • Polish takes time but matters
  • Good UX is invisible (like hidden scrollbars)
  • Documentation is for future you
  • Shipping something imperfect > planning something perfect

The Mechanic Brain Strikes Again

I keep noticing this. My approach to debugging code is exactly like diagnosing why a car won't start.

Systematic elimination:

  1. Inspect element → Check computed styles
  2. Disable CSS rules one by one → Isolate the problem
  3. Test the fix → Verify it actually works
  4. Clear cac he → Confirm behavior across conditions

Same process. Different domain. The diagnostic thinking transfers perfectly.

What's Next

This blog is live. The admin panel works. I can write, edit, and delete posts from a proper interface.

Tomorrow I'll probably notice something else I want to fix. There's always something.

But for now? Blog's done. Admin panel's done. It's deployed. It works.

Time to write more posts about the stuff I'm learning.


Built with: Laravel 12 • MySQL • Nginx • Hetzner VPS • Way too much coffee

If you're also learning: Start building. Break stuff. Fix it. Repeat. That's the game.