On This Page
|
April 2026 · What I've Been Up To
From ESP32 to cloud server: the birth of a 90s personal blog
Website Framework Setup
From ESP32 to Cloud Server On a whim, I decided to build a WEB 1.0-styled personal blog. The last time I had a public blog was before the pandemic. Initially deployed on an ESP32-S3, it was later migrated to a cloud server — the ESP32's performance just couldn't keep up. In recent years, I've grown increasingly fond of retro hardware, so the overall design adopts a style close to the Windows 95 era: pure static HTML, optimized for 1024×768 resolution, with special compatibility work for IE5.5.
Component Templates & Automated Build The site is driven by PowerShell build scripts, with HTML templates separated into the src/components/ directory. Header, banner, sidebars, and footer are each independent, with data injected via placeholders. The build process automatically scans blog metadata (date, title, tags) and supports draft mode (draft: true).
Footnotes & Custom TOC Implemented a [^N] footnote system — references are automatically converted to superscript anchor links, definitions are rendered at the end of the article with bidirectional jumping. Supports cross-line definitions and multi-paragraph footnotes. Articles can use toc: Title | #anchor at the top for a custom sidebar table of contents, falling back to automatic heading extraction when empty.
Guestbook Evolution
CGI + TXT Storage The guestbook uses CGI for submission processing and pipe-delimited txt files for storage. The build process reads the last 20 messages and injects them into the page — no database needed. Supports email input and IP display/hide (checkbox).
Email Reply Notifications When a message contains @username, the system automatically detects it and sends an email notification. Supports QQ Foxmail SMTP (port 465 SSL). The email template is 90s retro style — table layout + 3D borders + Win95 color scheme. The reply button auto-fills the @mention.
Blog Editor Developed a web-based editor (/cgi-bin/editor.py) with formatting toolbar, table generation, footnote insertion, character count, and new-window preview. Compatible with IE5.5 (TextRange selection fallback, String.trim polyfill). Supports bilingual content editing and article list management.
Bilingual Support & Internationalization
Full site supports Chinese/English language switching, build scripts support -Lang parameter
All 8 blog posts and homepage translated to English, English content separated into blog/en/
Both sidebars, archive page, and tag cloud fully bilingualized
Added English sidebar versions (sidebar-left-en.html, sidebar-right-en.html)
Fixed archive/tags page language switch URL placeholder issues
Toolbox & Utilities
Added toolbox page (/cgi-bin/toolbox.py): Base64/URL encode/decode, MD5/SHA hashing, timestamp conversion, character/word count, case conversion, password generator (random/PIN/memorable word), IP lookup
On-site search (no JS required), CGI full-text matching against search_index.txt
RSS feed + sitemap.xml, fixed Chinese encoding issues
Article tag cloud page with tag-based filtering
Article archive page grouped by year-month
Custom 404 page
Server logging with automatic gzip compression of old logs
Other Improvements
Unified UTF-8 encoding across all site files, fixed UTF-16LE compatibility issues
Removed global <center> wrapper from main content area, headings independently centered
/index.html → / 301 redirect
Old Websites Collection expanded to 26 sites (OldWeb.today, ClassicReload, Marginalia Search, etc.)
Added Feature Example Article covering all feature usage
Sidebar added latest articles list + changelog
Blog bottom previous/next navigation, auto-sorted by date
web_server.py added nolog parameter
Bug Fix Log
Footnote cross-line matching: multi-line definitions no longer truncated by </font>
editor.py CGI POST double-read: stdin consumed twice causing form fields to be lost
Guestbook email input name attribute duplicate, email was never saved
RSS Chinese encoding: Get-Content needs explicit -Encoding UTF8
Path traversal vulnerability: /cgi-bin/../../data/ could bypass protected directories
Build script $ character escape error causing footnote definition removal to fail
editor.py newline round-trip: \r residue causing extra blank lines during editing
—— Written on April 27, 2026, a long April weekend
|
Tools
[Toolbox]
Latest Posts
» WD HC620 User Guide
» Scripts Overview
» May 2026 ·...
» IE 5.5 Com...
» Current Si...
» Article Archive
Tags
Daily
Changelog
Website Building
|