Urgent.News

What's breaking now, across thousands of outlets.

Tech

How I Built a Static Blog with 50+ Articles and Zero Frameworks: Pure HTML, CSS, and JavaScript

How I Built a Static Blog with 50+ Articles and Zero Frameworks: Pure HTML, CSS, and JavaScript Every few months, someone asks me the same question: "What framework is your blog built with? Next.js? Astro?" The answer usually surprises them: none. My blog, wuhuajin.com , is a fully static site built with pure HTML, CSS, and vanilla JavaScript — no React, no Vue, no build framework. It has over 50…

For years, I've been asked about the framework powering my blog. The answer always catches people off guard: none at all. Wuhuajin.com, my blog, is a completely static site crafted with just HTML, CSS, and vanilla JavaScript—no React, Vue, or any build tools. Over 50 articles have been published, and it maintains near-perfect PageSpeed scores for more than a year. This article details my decision to forgo frameworks, the architecture that powers the site, and the trade-offs to consider when pursuing a similar approach.

I abandoned frameworks for a content site because frameworks tackle problems like state management, component re-rendering, routing, and code organization that my simple blog didn't require. A blog's sole purpose is to deliver text and images to readers swiftly. Framing it that way, a zero-framework blog became the logical choice. It ensures maximum speed, minimal maintenance, full control over every byte of HTML, and long-term longevity.

The system operates on a straightforward principle: write in Markdown, ship as static HTML. No client-side rendering—each article is transformed into a standalone HTML file during the build process. The site's source, located in the src/ directory, consists of reusable components, article Markdown files, CSS, and JavaScript files. The content pipeline converts Markdown into prerendered HTML, parsing front matter, applying syntax highlighting, and generating pages that work seamlessly even with JavaScript disabled.

Build scripts, written in custom Node.js .cjs files, handle the prerendering process, generating HTML for articles, categories, the homepage, and sitemaps. Each script is independent, making the build process straightforward and deterministic. Development is facilitated by a simple server script that uses Node's built-in http module and file watchers to provide live reload functionality without the overhead of a heavy bundler.

For multilingual support, the site incorporates a lightweight dictionary for translation, which maps English keys to translated strings. This dictionary is used by a single i18n component, adding just a few hundred lines of code without the substantial payload of a full i18n solution. Performance improvements, including HTML size reduction, reduced render-blocking resources, and optimized images, demonstrate that a zero-framework approach doesn't compromise on speed.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How I Monetize a Static Blog Without a Backend: AdSense, Membership, and Tips

How I Monetize a Static Blog Without a Backend: AdSense, Membership, and Tips "Static sites can't make money" is one of those assumptions developers repeat until they actually try.

  • Monetization achieved through AdSense, membership, and tips on static blog
  • Google AdSense integrated via data.json for placement and performance optimization
  • Waffo Pancake subscription service handles payments with no backend required

Launching a Personal Website for a Global Audience: GitHub Pages, Cloudflare CDN, and DNS Strategy

Launching a Personal Website for a Global Audience: GitHub Pages, Cloudflare CDN, and DNS Strategy Most personal websites are built for the wrong audience. Not the wrong people — the wrong geography.

  • GitHub Pages offers free HTTPS, unlimited bandwidth, and a global CDN for static websites.
  • Cloudflare adds caching control, analytics, and domain protection to GitHub Pages sites.
  • Dual DNS strategy with two providers enhances reliability and mitigates DNS outage risks.

supabase-js try/catch Doesn't Catch Errors: Check { error }

Conclusion supabase-js query methods never throw on network or PostgREST failure. The contract template's current-version resolver branched only on whether data was present, without ever looking at…

  • Supabase-js query methods failed to handle network or PostgREST errors.
  • Contract-template resolver couldn't distinguish transient read failures from lack of published rows.
  • Refactored code into readCurrentRow function to check errors and return row data tuple.

omaforge 0.2.9: star addons to find them later

omaforge is the World of Warcraft addon manager for Linux and Omarchy. Version 0.2.9 lets you star addons, so you can bookmark one you haven’t installed and come back to it later.

  • Users can star addons for later installation
  • Starred tab shows all starred addons with filtering options
  • Updated version available for download on GitHub

More from Thursday 5 November →