AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Oct 4, 2026, 22:00 JST

Python and Claude Code, zero CDN: one brake on AI slop

Python and Claude Code, zero CDN: one brake on AI slop

3 Key Points

  1. What happened

    The author builds a small-business site with Python and Claude Code only — no CDN, no npm, no JS framework — and auto-fails root-absolute links, broken links, tag mismatches, and missing alt text.

  2. Why it matters

    One exception would let the next AI writing a page copy it, so strict checks are the author's guard against generated content drifting out of spec.

  3. What to watch

    The urls list is still hand-written across four places, so a forgotten entry means a new article never reaches search. A sitemap check currently stops the publish instead.

WHO IT HITSDevelopers and small-business owners who let AI generate and edit their static site pages. The author's rule — no exception for bad paths or tags — is a practical brake on AI-generated HTML going unnoticed.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The site is deliberately small. One Python script holds each page as a dictionary and writes it out, with a depth value that lets every page build its own relative paths. The author removed CDNs, npm, and JavaScript frameworks not as a style choice but because something kept breaking.

The thing that broke was root-absolute paths. Links written as /blog/... work once published, but open the local copy directly in a browser via file:// and every one of them points at the drive root. The author previews the local copy before publishing, so that failure stops all verification. The build now fails on a single root-absolute link, because one allowed exception would be copied by the next AI writing a page.

The same script watches for broken links, for tags such as section, div, table, and article whose opening and closing counts do not match, and for banned strings. Product pages are assembled from a CSV ledger: 22 rows, of which 17 with the publish flag set to yes are picked up (as of 2026-10-02, company count). Reading that ledger as utf-8 rather than utf-8-sig was the pitfall — Excel adds a BOM, the 公開 key gains invisible characters, r.get("公開") returns None, and an empty product list is generated with no error, visible only by eye. Photo files at 900px width are compared byte-for-byte before writing, so unchanged images are not rewritten, and photos of retired products are deleted. Sitemap lastmod dates are now set by comparing an HTML hash, with untracked pages simply left without a lastmod. The one remaining manual step is the urls list, written in four places; a missing entry would keep an article out of the sitemap. A pre-publish check currently halts on pages missing from sitemap.xml — the author would rather that class of problem did not arise at all.

FAQ
Why did the author drop CDNs from the site?
It was not a preference. Root-absolute links such as /blog/... worked once published, but broke when the local copy was opened via file://. The author checks the local copy in a browser before publishing.
How does the build catch broken or malformed pages?
After writing HTML, the same script scans for banned strings, root-absolute paths, broken links, tag mismatches, and img tags without alt. Tag counts are compared for section, div, table, and article.
Why does the sitemap sometimes omit lastmod dates?
Pages older than when change tracking began cannot be dated reliably. Their date is set to None and the lastmod line is left out, which the author prefers over guessing.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleTSMC, $2.4 trillion chipmaker behind AI, reports $143 billion revenue