<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>wordpress on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/wordpress/</link>
    <description>Recent content in wordpress on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 02 Jan 2026 12:30:00 +0800</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/wordpress/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Migrating my blog from WordPress to Hugo</title>
      <link>https://www.s-anand.net/blog/migrating-my-blog-from-wordpress-to-hugo/</link>
      <pubDate>Fri, 02 Jan 2026 12:30:00 +0800</pubDate>
      <guid>https://www.s-anand.net/blog/migrating-my-blog-from-wordpress-to-hugo/</guid>
      <description>&lt;p&gt;In 2009, I migrated from a self-made Perl static site generator to &lt;a href=&#34;https://www.wordpress.org/&#34;&gt;WordPress&lt;/a&gt; because it was slow, WordPress was dynamic and rapidly growing in features, and I wanted to write rather than code. (Also, I had &lt;em&gt;plenty&lt;/em&gt; of time in 2009 for such things!)&lt;/p&gt;
&lt;p&gt;Over the years, problems crept in. Hosting costs ($200/year) for a slow server. No local writing - &lt;a href=&#34;https://www.s-anand.net/blog/wordpress-themes-on-windows-live-writer/&#34;&gt;Windows Live Writer&lt;/a&gt; was dead. I wasn&amp;rsquo;t using most WordPress features. So it was time to migrate back to a static site generator. (Also, I now have &lt;em&gt;plenty&lt;/em&gt; of time for such things!)&lt;/p&gt;
&lt;p&gt;I tried in 2024. But the complexity of the migration was higher than my laziness. (I tried with LLMs. Didn&amp;rsquo;t work.)&lt;/p&gt;
&lt;p&gt;Finally, in Dec 2025, coding agents were good enough to get this done. Codex and Claude Code both doubled their limits for the holidays, and I had no meetings. So, over two days, I joyfully migrated to a static site.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content is written in Markdown via VS Code and pushed to &lt;a href=&#34;https://github.com/sanand0/blog/&#34;&gt;https://github.com/sanand0/blog/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A GitHub Action &lt;a href=&#34;https://github.com/sanand0/blog/blob/main/.github/workflows/deploy.yml&#34;&gt;&lt;code&gt;deploy.yaml&lt;/code&gt;&lt;/a&gt; publishes to GitHub Pages&lt;/li&gt;
&lt;li&gt;It uses a &lt;a href=&#34;https://github.com/sanand0/blog/blob/main/hugo.toml&#34;&gt;&lt;code&gt;hugo.toml&lt;/code&gt;&lt;/a&gt; configuration with &lt;a href=&#34;https://github.com/sanand0/blog/tree/main/scripts&#34;&gt;supporting scripts&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&amp;rsquo;re the useful practices I distilled from my prompts.&lt;/p&gt;
&lt;h3 id=&#34;create-a-planmd-before-complex-tasks&#34;&gt;Create a &lt;code&gt;PLAN.md&lt;/code&gt; before complex tasks&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Create a plan in PLAN.md to convert my blog into Markdown-based content I can commit on GitHub and is published via a static site generator retaining the same URLs.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;My website https://s-anand.net/ hosts a WordPress blog at https://s-anand.net/blog/ and I have exported the content as an XML file using the WordPress export tool into sanand.WordPress.2025-12-28.xml. Read it to understand.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Each post and page must become a Markdown file with front-matter containing all metadata (title, date, tags, categories, slug, author, etc). The Markdown must be stored as
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; ./metadata.yml (for site-wide metadata)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; ./posts/yyyy/yyyy-mm-dd-slug.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; ./pages/slug.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; ...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;You can browse the site https://s-anand.net/blog/ to see the site structure and all the types of pages that are generated.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;You can also &amp;#34;ssh sanand&amp;#34; to access the server and &lt;span class=&#34;sb&#34;&gt;`cd www/blog/`&lt;/span&gt; to see the WordPress configuration.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Note that some posts / pages have complex content: tables, code, embedded media, shortcodes, JavaScript, etc. Identify all such cases and how to handle them. There may still be edge cases that you don&amp;#39;t know how to handle; list them out. This is a major part of the plan - ensuring that you cover all types of content -- either with a plan to handle it easily and elegantly, or explicitly identifying ALL edge cases and listing them.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Include how to handle images and other media. The WordPress export XML file may not contain the actual media files; identify how to get them. Suggest how to store them - I can store them in the Git repo, or in GitHub releases (needs to be fetched during CI process), or in R2 (direct access like a CDN). I would also like to compress media (e.g. to WebP) for better performance.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I plan to use either of these hosting options. Let me know what you prefer:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; GitHub CI to deploy to GitHub Pages (preferred: it&amp;#39;s free, easy, and reliable).
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; OR, convert locally to static HTML and upload to R2 / CloudFlare pages (priced, more effort, but reliable).
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Suggest a static site generator (SSG) to use. I prefer something FAST and simple. I prefer single-binary SSGs or installation-free SSGs (e.g. via npx, uvx) if possible.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Consider any other requirements I may have missed, e.g. plugin features, SEO, redirects, analytics, comments, search, RSS feeds, sitemaps, etc. Going through the site or the WordPress configuration may help identify these. Suggest how to handle them.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It analyzed my blog: blocks and shortcodes used, plugins, URL structure, etc. and came up with a pretty good plan. Here are some notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Record unresolved edge cases for manual review. (Wise!)&lt;/li&gt;
&lt;li&gt;Prefer raw HTML inside Markdown when conversion would lose fidelity. (Interesting! Also has detailed rules for tables, code, figures, iframes, forms, &amp;hellip;)&lt;/li&gt;
&lt;li&gt;Frontmatter: Required: title, date, lastmod, slug, author, categories, tags, status, draft, canonical, summary/excerpt, comment_status, ping_status. (Um&amp;hellip; too much?)&lt;/li&gt;
&lt;li&gt;Use Hugo (single binary, fast, built-in RSS/sitemap/taxonomies, supports raw HTML and shortcodes) and GitHub Pages via GitHub Actions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There&amp;rsquo;s &lt;em&gt;no&lt;/em&gt; way I would have thought of all of these!&lt;/p&gt;
&lt;h3 id=&#34;analyze-data-while-planning&#34;&gt;Analyze data while planning&lt;/h3&gt;
&lt;p&gt;Even while it was planning, another thing struck me. I won&amp;rsquo;t use GitHub to serve assets. It bloats the repo. Plus, there&amp;rsquo;s an opportunity to compress better with WebP. So I asked it to analyze my media.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I&amp;#39;ve rsynced &lt;span class=&#34;sb&#34;&gt;`sanand:www/blog/wp-content/uploads/`&lt;/span&gt; to &lt;span class=&#34;sb&#34;&gt;`./uploads/`&lt;/span&gt; locally.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Which uploads are unused in my blog posts / pages. Tell me the number, total size, and save them all in unused-uploads.tsv with columns size, filename.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;If I convert all used images over 10KB to WebP, how much space will I save? (An estimate is fine; I don&amp;#39;t need exact numbers.)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It parsed the WordPress export against my local &lt;code&gt;uploads/&lt;/code&gt;, listed unused uploads (1.7K files of 87MB), and found 515 used files of 34MB. It estimated ~11MB savings from WebP conversion of used images &amp;gt;10KB.&lt;/p&gt;
&lt;h3 id=&#34;edit-planmd-using-the-agent-not-manually&#34;&gt;Edit &lt;code&gt;PLAN.md&lt;/code&gt; using the agent, not manually&lt;/h3&gt;
&lt;p&gt;Editing manually is prone to mistakes, e.g. introducing contradictions.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am fine with Hugo + GitHub Pages.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/blog must remain the subpath - the URL structure must NOT be disturbed. Prefer publishing into a /blog/ folder.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Import old comments (prefer YAML over JSON for easy reading). The new static site will not have dynamic comments; I may switch to Giscus or Utterances later.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;As for media, let&amp;#39;s convert and save WebP versions instead of the originals and commit them directly to the Git repo under uploads/. Only used media should be included.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Revise PLAN.md accordingly. Let me know what other information you need, if any.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Useful lesson: &lt;strong&gt;Let me know what other information you need, if any.&lt;/strong&gt; Life is full of unknown unknowns!&lt;/p&gt;
&lt;p&gt;It did ask if I was OK changing URLs from &lt;code&gt;.jpg|.png&lt;/code&gt; to &lt;code&gt;.webp&lt;/code&gt;, which I confirmed in the next prompt.&lt;/p&gt;
&lt;h3 id=&#34;implement-small-steps-run-and-commit-as-you-go&#34;&gt;Implement small steps, run and commit as you go&lt;/h3&gt;
&lt;p&gt;I know from experience that a single-shot implementation of this size would be too complex today. So I asked for image conversion first.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Now, implement the upload handling. Delete unused uploads (I have backups on the server). Compress JPEGs with 50% quality and PNGs losslessly with 256 colors. Let me know the revised size of assets.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I am OK with image URLs breaking.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Implement this by writing a script (bash, Python, Node JS - anything is fine, whatever is easiest) that will create an &lt;span class=&#34;sb&#34;&gt;`assets/`&lt;/span&gt; folder with the converted images from the &lt;span class=&#34;sb&#34;&gt;`uploads/`&lt;/span&gt; folder. I will want to re-run this later with some tweaks.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Commit as you go.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Having the agent &lt;strong&gt;run the script&lt;/strong&gt; is the most powerful idea in here. If it makes a mistake, it can figure it out and fix itself.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Commit as you go&lt;/strong&gt; is useful. I can undo changes later. I also efficiently get a sense of the progress and thinking.&lt;/p&gt;
&lt;p&gt;It took a &lt;em&gt;long&lt;/em&gt; time (on GPT 5.2 Codex - Extra High Thinking), wrote a &lt;code&gt;scripts/prepare_assets.py&lt;/code&gt;, switched from ImageMagick to Pillow for better control (strange!), trouble-shooted PNG transparency bugs, ran it, noted that 41 files in my blog that were missing, and committed everything.&lt;/p&gt;
&lt;h3 id=&#34;run-post-mortems-mid-way&#34;&gt;Run post-mortems mid-way&lt;/h3&gt;
&lt;p&gt;Strangely the JPEG files weren&amp;rsquo;t converted. So I asked:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Why does the assets/ folder still have some .jpg files, e.g. temperature.jpg? I assumed they&amp;#39;d all be converted to webp.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It said:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Because the script follows your latest instruction: it compresses JPEGs and PNGs in-place and keeps their original formats.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;OOPS! My mistake. Anyway, I also needed it to convert MP3 to Opus. So&amp;hellip;&lt;/p&gt;
&lt;h3 id=&#34;ask-for-actionable-exception-reports&#34;&gt;Ask for actionable exception reports&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s have it do all the conversions.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Convert all JPEG files to WebP, too, with 50% quality. Use cwebp to convert - it is faster and has better quality.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Let&amp;#39;s also compress audio files to OPUS with ffmpeg using &lt;span class=&#34;sb&#34;&gt;`-c:a libopus -b:a 12k -ac 1 -application voip -vbr on -compression_level 10`&lt;/span&gt;. Modify the script accordingly.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Also modify the script to list missing local uploads/ mentioning the URL on https://s-anand.net/blog/... post or page that references each. Each line should list the missing filename and URL, tab-separated.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But note the last line. It had already identified that some uploads were missing. To &lt;strong&gt;action&lt;/strong&gt; that, I would need a post -&amp;gt; file mapping, which I asked for.&lt;/p&gt;
&lt;h3 id=&#34;delegate-verification-to-the-agent&#34;&gt;Delegate verification to the agent&lt;/h3&gt;
&lt;p&gt;In the exception report, there was an &lt;code&gt;amazoncooliri&lt;/code&gt; file missing. I couldn&amp;rsquo;t find it in the blog XML. So I asked:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Double-check the files mentioned in the missing-uploads.tsv. Do these files really exist in the XML? For example, it mentions &amp;#34;amazoncooliri&amp;#34;. But there is no such word in the XML, I think, and uploads/amazoncooliris.jpg (which is probably what it refers to) exists. There may be similar mistakes. Make sure nothing required is missing either.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;At first, I checked the code to see why &lt;code&gt;amazoncooliris&lt;/code&gt; became &lt;code&gt;amazoncooliri&lt;/code&gt;. But months of practicing &lt;del&gt;laziness&lt;/del&gt; delegation took over and I had it debug itself.&lt;/p&gt;
&lt;p&gt;Turned out it wrote &lt;code&gt;\\s&lt;/code&gt; instead of &lt;code&gt;\s&lt;/code&gt; which fixed it.&lt;/p&gt;
&lt;h3 id=&#34;accept-that-you-will-make-mistakes&#34;&gt;Accept that you &lt;em&gt;will&lt;/em&gt; make mistakes&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Why are there PNG images in assets? I assumed there wouldn&amp;#39;t be any and all would be WebP files...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It replied:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Because the script only converts &lt;strong&gt;JPEG → WebP&lt;/strong&gt;. For PNGs, it follows your instruction to “compress PNGs losslessly with 256 colors,” so they stay PNG.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;OOPS AGAIN! I forgot to ask it to convert PNGs.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Convert all PNGs to WebP using cwebp maximal effort with 256 color palette, just like the jpegs. Update, re-run, commit.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;verification-reports-speed-up-reviews&#34;&gt;Verification reports speed up reviews&lt;/h3&gt;
&lt;p&gt;Now for the big one: converting the blog posts.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Now implement the plan in PLAN.md to convert the WordPress XML export to Markdown files with front-matter. Write a Python script with inline dependencies that &lt;span class=&#34;sb&#34;&gt;`uv run`&lt;/span&gt; can execute. Run it and generate all the Markdown files. Verify that everything looks good - especially edge cases.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Make a list of edge cases you could handle that I should verify.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Make a list of any edge cases you couldn&amp;#39;t handle.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Share these as links to https://s-anand.net/blog/.... as well as the local relative paths.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Apart from converting the posts, it generated:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;reports/edge-cases-unhandled.tsv&lt;/code&gt; &amp;ndash; an exception report&lt;/li&gt;
&lt;li&gt;&lt;code&gt;reports/edge-cases-handled.tsv&lt;/code&gt; &amp;ndash; a verification report&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The verification report was handy. I could see the edge cases (e.g. upload URLs rewritten, iframes/tables/objects/scripts that were retained, WordPress comment blocks removed) and spot check quickly.&lt;/p&gt;
&lt;p&gt;Without this, I would have spent a lot more time reviewing. This gave me &lt;em&gt;confidence&lt;/em&gt; that it had handled edge cases well.&lt;/p&gt;
&lt;h3 id=&#34;generate-easy-to-review-to-review-content&#34;&gt;Generate easy-to-review to review content&lt;/h3&gt;
&lt;p&gt;I find it productive to have the agent generate content that is &lt;em&gt;easy&lt;/em&gt; to review. At this point, I had a bunch of Markdown files that were &lt;em&gt;very&lt;/em&gt; easy for me to scan. So I created an &lt;em&gt;extensive&lt;/em&gt; list of changes:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Drop redundant or unchanging frontmatter. For example:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Retain title, date, lastmod, slug, categories
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; author: sanand is always the same. Drop
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; draft: false and status: publish are redundant. Drop both
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; url: is deriable from the slug. Drop. Same for wp_link
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; If tags, excerpt, aliases, etc. are missing, drop them
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Drop meta: entirely
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Drop menu_order, ping_status, comment_status
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Drop wip_guid in favor of wp_id (retain wip_id)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; If I missed any other frontmatter, use the same principles.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Insert the featured image as the first element in the post, instead of the featured_image frontmatter.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Rewrite all the upload links (http://www.s-anand.net/blog/wp-content/uploads/xxx) to relative links to uploads/ (e.g. ../../uploads/xxx).
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Rerun. Commit as you go.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Finally, write a script to detect all links to s-anand.net/ that are not covered by this approach. For example, I have a bunch of direct assets like https://files.s-anand.net/blog/a/mystic-light.mp3 or other non-WordPress pages on my website. Create a TSV report with the link and the source.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;PS: I keep editing prompt.md with my prompts. Keep ignoring it.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The last line was because I was also saving my prompts and it kept getting confused why a file it didn&amp;rsquo;t create kept changing 🙂.&lt;/p&gt;
&lt;h3 id=&#34;give-it-all-your-tools&#34;&gt;Give it all your tools&lt;/h3&gt;
&lt;p&gt;I had it install Hugo and run it. (I could have set it up myself, but why bother?)&lt;/p&gt;
&lt;p&gt;I allowed it to &lt;code&gt;ssh&lt;/code&gt; to my server to check logs if needed.&lt;/p&gt;
&lt;p&gt;In both cases, these are tools I would need to build and test. It makes sense to let the agent use them directly.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Corrections:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; The relative URLs should be ../../assets/ not ../../uploads/ (my mistake)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; No action required on the file URLs and swf links. I&amp;#39;ll handle those.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Now, use Hugo (install via &lt;span class=&#34;sb&#34;&gt;`mise use -g hugo`&lt;/span&gt;) and generate a static site from the Markdown files.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ensure that ALL the URLs from https://s-anand.net/blog/... are retained exactly, including URLs posts, pages, categories, tags, author pages, year (or other time period), etc. You can &lt;span class=&#34;sb&#34;&gt;`ssh sanand`&lt;/span&gt; and scan logs if that&amp;#39;ll help.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;This will be deployed via GitHub pages. Create the GitHub action workflow to build and deploy the site on every push to main.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Commit as you go.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that I had made a mistake mentioning &lt;code&gt;uploads/&lt;/code&gt; instead of &lt;code&gt;assets/&lt;/code&gt;. This keeps happening.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t know &lt;em&gt;any&lt;/em&gt; Hugo, so this was a bold step. But the output would be easy to review (it&amp;rsquo;s a static site), so &lt;strong&gt;more reviewability = more confidence&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;After a &lt;em&gt;long&lt;/em&gt; time, it generated the static site. It managed to self-correct a bunch of stuff. For example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;I removed &lt;code&gt;--minify&lt;/code&gt; because inline scripts with &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; in &lt;code&gt;posts/2011/2011-05-19-eating-more-for-less.md&lt;/code&gt; break JS minification; HTML builds cleanly without minify.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h3 id=&#34;prefer-ui-reviews-over-code-reviews-for-ease&#34;&gt;Prefer UI reviews over code reviews for ease&lt;/h3&gt;
&lt;p&gt;In fact, if required, have it &lt;em&gt;build&lt;/em&gt; a throw-away tool to help you review.&lt;/p&gt;
&lt;p&gt;In my case, the output was &lt;em&gt;functional&lt;/em&gt; but ugly. So ugly that I couldn&amp;rsquo;t review it properly. I suggested a few obvious fixes (like broken links) but the main ask was to pick a theme and make it look like my website.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;FYI: I removed mise.toml. Running &lt;span class=&#34;sb&#34;&gt;`mise x hugo -- hugo`&lt;/span&gt; should still work, but feel free to reinstall.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ensure that ALL LINKS are relative. For example, public/blog/index.html links to https://s-anand.net/blog/tamil-ai/ but I&amp;#39;d like to link to tamil-ai/ instead.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Pick and implement a nice, popular, lightweight theme that&amp;#39;s suitable for blogs.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Include these features. Where possible, use modern, well-supported &amp;amp; popular plugins or themes rather than custom code.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Below the title, have a single line showing the date created (date updated shown only if different from date created), categories with links to category pages, tags with links to tag pages (if any) are present.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Code blocks should be syntax-highlighted.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; At the bottom, include a link to the next and the previous posts (with title).
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Add a footer to all pages that lists
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; All categories with links &amp;amp; post count
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; All year archives with links and post count
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; All pages with links
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Run and test.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;you-can-resume-if-it-hangs-dont-worry-about-context&#34;&gt;You can resume if it hangs. Don&amp;rsquo;t worry about context&lt;/h3&gt;
&lt;p&gt;This took forever and I think Codex crashed or hung or something. So I killed it, resumed, and asked:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;It&amp;#39;s been a while... maybe you were stuck? Resume and complete.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It managed to resume. I&amp;rsquo;m not sure if there was some context loss or confusion, but I&amp;rsquo;m learning to worry less.&lt;/p&gt;
&lt;h3 id=&#34;allow-it-design-flexibility&#34;&gt;Allow it design flexibility&lt;/h3&gt;
&lt;p&gt;Internal links were still broken. I didn&amp;rsquo;t know why, nor enough to fix them. So, rather than make a design decision (e.g. always use full / absolute / relative URLs), I let it decide.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;There are several problems due to wrong relative paths. If it will be easier, feel free to switch back to absolute paths for /blog/ to fix them.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Featured image URLs seem wrong. blog/ai-can-be-held-to-account/ links to &amp;#34;/blog/../assets/pig-court.webp&amp;#34; instead of just &amp;#34;../assets/pig-court.webp&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; When I visit /blog/2003/ the CSS is fine but it breaks in /blog/2003/page/2/ -- and the relative links from that page also break.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; The links from the footers in /blog/2003/ point to /2016/ instead of /blog/2016/ for example
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Swap &amp;#34;Next&amp;#34; and &amp;#34;Prev&amp;#34;. &amp;#34;Prev&amp;#34; indicates older posts.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Syntax highlighting of code blocks doesn&amp;#39;t seem to be working. In blog/openai-tts-cost/ I see a single block like this.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;```
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;lt;code lang=&amp;#34;bash&amp;#34; class=&amp;#34;language-bash&amp;#34;&amp;gt;curl &amp;#34;https://api.openai.com/v1/organization/usage/audio_speeches?start_time=$(date -d &amp;#39;1 day ago&amp;#39; +%s)&amp;amp;amp;project_ids=$PROJECT_ID&amp;amp;amp;group_by=model&amp;#34; \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &amp;#34;Authorization: Bearer $OPENAI_ADMIN_KEY&amp;#34; \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &amp;#34;Content-Type: application/json&amp;#34;&amp;lt;/code&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;```&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It decided to use absolute paths.&lt;/p&gt;
&lt;h3 id=&#34;generate-documentation&#34;&gt;Generate documentation&lt;/h3&gt;
&lt;p&gt;Apart from adding a few more features / fixes, I had it generate a README.md documenting what I would need to run this in the future.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Add featured images as thumbnails to post listings (e.g. blog home, category pages, tag pages, archive pages). Ensure that there is a placeholder (an elegant blank image) if there is no featured image.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Left-align the footer links.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Now, clean-up and add a README.md that explains the structure of the repo, how to build and deploy, etc.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I also had it fix another design error I made. The placeholders I asked for didn&amp;rsquo;t look good.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Skip featured images in post listings, post pages, etc. if they don&amp;#39;t exist. No need for a placeholder.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;ask-for-effort-estimates&#34;&gt;Ask for effort estimates&lt;/h3&gt;
&lt;p&gt;At this point, things were fine. But I was curious if we could refactor a bit.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m concerned if it might mess it up, though. &lt;strong&gt;Effort is a good proxy for errors&lt;/strong&gt;. So I asked it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;How easy are these changes? Just tell me, don&amp;#39;t implement them.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Set it up so that the content/ directory is auto-generated from posts/ without needing to be committed.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Drop the slug: frontmatter and instead, derive it from the filename.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Embed the comments in the posts as Markdown, clearly distinguished from the content, rather than keep them in comments/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It&amp;rsquo;s response:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Auto-generate &lt;code&gt;content/&lt;/code&gt; from &lt;code&gt;posts/&lt;/code&gt; is moderate effort&amp;hellip;&lt;/li&gt;
&lt;li&gt;Dropping &lt;code&gt;slug&lt;/code&gt; frontmatter is easy if you accept Hugo’s filename‑based slug rules&amp;hellip;&lt;/li&gt;
&lt;li&gt;Embedding comments into each post is moderate effort&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;probe-for-confidence&#34;&gt;Probe for confidence&lt;/h3&gt;
&lt;p&gt;I asked:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;What&amp;#39;s Hugo&amp;#39;s filename-based slug rules?
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I didn&amp;rsquo;t read the output. My aim was not to learn. It was more to glance at it, see if (based on my considerable experience in this area) if it looked reasonable. In short, I was &lt;strong&gt;probing for confidence&lt;/strong&gt; &amp;ndash; its &lt;em&gt;and&lt;/em&gt; mine.&lt;/p&gt;
&lt;h3 id=&#34;continue-the-session-for-the-long-tail&#34;&gt;Continue the session for the long tail&lt;/h3&gt;
&lt;p&gt;Normally, I would have created a new session to implement changes and fixes.&lt;/p&gt;
&lt;p&gt;But the session was auto-compacting quite well. So rather than lose context, I had it create a build steps and run &lt;em&gt;several&lt;/em&gt; minor fixes over the next few days. I didn&amp;rsquo;t need to specify the context again and again.&lt;/p&gt;
&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;
&lt;p&gt;Here&amp;rsquo;re the lessons I distilled from this migration, tagged by whether it&amp;rsquo;s new to me.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th style=&#34;text-align: right&#34;&gt;#&lt;/th&gt;
					&lt;th&gt;Lesson&lt;/th&gt;
					&lt;th&gt;New?&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;1&lt;/td&gt;
					&lt;td&gt;Create a &lt;code&gt;PLAN.md&lt;/code&gt; before complex tasks&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;2&lt;/td&gt;
					&lt;td&gt;Analyze data while planning&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;3&lt;/td&gt;
					&lt;td&gt;Edit &lt;code&gt;PLAN.md&lt;/code&gt; using the agent, not manually&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;4&lt;/td&gt;
					&lt;td&gt;Implement small steps, run and commit as you go&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;5&lt;/td&gt;
					&lt;td&gt;Run post-mortems mid-way&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;6&lt;/td&gt;
					&lt;td&gt;Ask for actionable exception reports&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;7&lt;/td&gt;
					&lt;td&gt;Delegate verification to the agent&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;8&lt;/td&gt;
					&lt;td&gt;Accept that you &lt;em&gt;will&lt;/em&gt; make mistakes&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;9&lt;/td&gt;
					&lt;td&gt;Verification reports speed up reviews&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;10&lt;/td&gt;
					&lt;td&gt;Generate easy-to-review to review content&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;11&lt;/td&gt;
					&lt;td&gt;Give it all your tools&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;12&lt;/td&gt;
					&lt;td&gt;Prefer UI reviews over code reviews for ease&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;13&lt;/td&gt;
					&lt;td&gt;You can resume if it hangs. Don&amp;rsquo;t worry about context&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;14&lt;/td&gt;
					&lt;td&gt;Allow it design flexibility&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;15&lt;/td&gt;
					&lt;td&gt;Generate documentation&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;16&lt;/td&gt;
					&lt;td&gt;Ask for effort estimates&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;17&lt;/td&gt;
					&lt;td&gt;Probe for confidence&lt;/td&gt;
					&lt;td&gt;New&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td style=&#34;text-align: right&#34;&gt;18&lt;/td&gt;
					&lt;td&gt;Continue the session for the long tail&lt;/td&gt;
					&lt;td&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
</description>
    </item>
    <item>
      <title>A challenge of blog questions</title>
      <link>https://www.s-anand.net/blog/a-challenge-of-blog-questions/</link>
      <pubDate>Tue, 04 Mar 2025 11:13:55 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/a-challenge-of-blog-questions/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://thejeshgn.com/2025/02/27/a-challenge-of-blog-questions/&#34;&gt;Thejesh&lt;/a&gt; tagged me with these questions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why did you start blogging in the first place?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I started my website in 1997 on Geocities at &lt;code&gt;https://www.geocities.com/root_node/&lt;/code&gt;, mostly talking about me. (A cousin once told me, &amp;ldquo;Anand&amp;rsquo;s site is like &lt;a href=&#34;https://en.wikipedia.org/wiki/T._N._Seshan&#34;&gt;TN Seshan&lt;/a&gt; - talking only about himself.&amp;rdquo; 🙂)&lt;/p&gt;
&lt;p&gt;(As an aside, I didn&amp;rsquo;t know that searching for &lt;a href=&#34;https://www.google.com/search?q=geocities&#34;&gt;Geocities on Google&lt;/a&gt; renders the results in &lt;a href=&#34;https://www.reddit.com/r/google/comments/1e6kbpp/googling_geocities_changes_your_search_result_font/&#34;&gt;Comic Sans&lt;/a&gt;!)&lt;/p&gt;
&lt;p&gt;I wanted a place to share the interesting links I found. Robot Wisdom by &lt;a href=&#34;https://en.wikipedia.org/wiki/Jorn_Barger&#34;&gt;John Barger&lt;/a&gt; and &lt;a href=&#34;https://scripting.com/&#34;&gt;Scripting News&lt;/a&gt; by &lt;a href=&#34;https://en.wikipedia.org/wiki/Dave_Winer&#34;&gt;Dave Winer&lt;/a&gt; were great examples: collection of interesting links updated daily.&lt;/p&gt;
&lt;p&gt;In &lt;a href=&#34;https://www.s-anand.net/blog/1999/&#34;&gt;July 1999&lt;/a&gt;, as a student at IIMB, I decided to put that into action by creating a custom HTML page updated manually.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What platform are you using to manage your blog and why did you choose it? Have you blogged on other platforms before?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;WordPress. Because it was the most fully-featured, mature platform when I migrated to it around 2006.&lt;/p&gt;
&lt;p&gt;Before that, I used:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A custom HTML page on Geocities. But it was hard to update multiple links, create individual pages, categories, etc. So…&lt;/li&gt;
&lt;li&gt;A Perl-based static-site generator I wrote myself. But as my link count grew, each generation took too long. So …&lt;/li&gt;
&lt;li&gt;A CGI-Perl-based blogging engine I hosed on freestarthost.com, handling commenting, etc. But at BCG, I didn&amp;rsquo;t have time to add many features (linkback, RSS, etc.) So…&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.blogger.com/&#34;&gt;Blogger&lt;/a&gt; as a parallel blog, briefly. But it didn&amp;rsquo;t have as many features as (nor the portability of) WordPress. So…&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://wordpress.com/&#34;&gt;WordPress&lt;/a&gt; - moving across a bunch of hosting services, and currently on &lt;a href=&#34;https://www.hostgator.com/&#34;&gt;HostGator&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I also blogged in parallel on InfyBlog, Infosys&amp;rsquo; internal blogging platform on LiveJournal.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;How do you write your posts? For example, in a local editing tool, or in a panel/dashboard that&amp;rsquo;s part of your blog?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I started with custom HTML in Emacs (or whatever code editor I kept moving to).&lt;/p&gt;
&lt;p&gt;Briefly, I used &lt;a href=&#34;https://en.wikipedia.org/wiki/Windows_Live_Writer&#34;&gt;Windows Live Writer&lt;/a&gt;, which was quite a good blogging tool.&lt;/p&gt;
&lt;p&gt;Now, I write in Markdown on VS Code and paste it into WordPress&amp;rsquo; editor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When do you feel most inspired to write?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When an idea that&amp;rsquo;s been bubbling for a while in my mind bursts out.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Do you publish immediately after writing, or do you let it simmer a bit as a draft?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I publish immediately.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&amp;rsquo;s your favorite post on your blog?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/the-next-chapter-of-my-life/&#34;&gt;The next chapter of my life&lt;/a&gt;, which I wrote on a one-way flight back from the UK to India to start &lt;a href=&#34;https://www.gramener.com/&#34;&gt;Gramener&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Any future plans for your blog? Maybe a redesign, a move to another platform, or adding a new feature?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I plan to move it to GitHub Pages with Markdown content and a static site generator. I might write my own SSG again in Deno or use one of the faster ones.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who&amp;rsquo;s next?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d love to hear from&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://mvark.blogspot.com/&#34;&gt;Anil Radhakrishna&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://karthiks.co/&#34;&gt;Karthik Sashidhar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://simonwillison.net/&#34;&gt;Simon Willison&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Install Wordpress</title>
      <link>https://www.s-anand.net/blog/install-wordpress/</link>
      <pubDate>Wed, 14 Jul 2010 21:26:58 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/install-wordpress/</guid>
      <description>&lt;p&gt;Once you’ve &lt;a href=&#34;https://www.s-anand.net/blog/install-xampp/&#34;&gt;installed XAMPP&lt;/a&gt;, &lt;a href=&#34;http://wordpress.org/download/&#34;&gt;download Wordpress&lt;/a&gt; and unzip it into your xampp/htdocs folder.  &lt;p&gt;You’ll first need to create a database, which you can do by visiting the &lt;a href=&#34;http://localhost/phpmyadmin/&#34;&gt;/phpmyadmin/&lt;/a&gt; on your localhost, typing in the database name and pressing ‘Create’.  &lt;p&gt;Now go to &lt;a href=&#34;http://localhost/wordpress/&#34;&gt;/wordpress/&lt;/a&gt;, click the buttons and fill out the form. Type in &#39;root&#39; for the database username and leave the password blank. Select any password you want for the administrator account. You can now log in with this administrator password and log into the Wordpress dashboard.&lt;/p&gt; &lt;p&gt;&lt;object width=&#34;600&#34; height=&#34;475&#34;&gt;&lt;param name=&#34;movie&#34; value=&#34;http://www.youtube.com/v/DrjUKCZexLQ&amp;amp;hl=en_GB&amp;amp;fs=1&#34;&gt;&lt;/param&gt;&lt;param name=&#34;allowFullScreen&#34; value=&#34;true&#34;&gt;&lt;/param&gt;&lt;param name=&#34;allowscriptaccess&#34; value=&#34;always&#34;&gt;&lt;/param&gt;&lt;embed src=&#34;http://www.youtube.com/v/DrjUKCZexLQ&amp;amp;hl=en_GB&amp;amp;fs=1&#34; type=&#34;application/x-shockwave-flash&#34; allowscriptaccess=&#34;always&#34; allowfullscreen=&#34;true&#34; width=&#34;600&#34; height=&#34;475&#34;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rajasekar&lt;/strong&gt; &lt;em&gt;6 Oct 2010 6:01 am&lt;/em&gt;:
Hello Anand Brother . I m rajasekar currently working as a UI Designer in Chennai . U r site is nice&amp;hellip; I m fresher. When i see u r website . They are many things to learn here..&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>WP-SuperCache</title>
      <link>https://www.s-anand.net/blog/wp-supercache/</link>
      <pubDate>Wed, 10 Feb 2010 17:27:09 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/wp-supercache/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/responsetimes.gif&#34;&gt;&lt;img alt=&#34;response-times&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/responsetimes.gif&#34; title=&#34;response-times&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That dip there in response time is thanks to &lt;a href=&#34;http://wordpress.org/extend/plugins/wp-super-cache/&#34;&gt;WP-SuperCache&lt;/a&gt;. My average page load time has dropped from 1 second to 0.25 seconds.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Short URLs</title>
      <link>https://www.s-anand.net/blog/short-urls/</link>
      <pubDate>Sat, 11 Apr 2009 18:59:45 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/short-urls/</guid>
      <description>&lt;p&gt;With &lt;a href=&#34;http://joshua.schachter.org/2009/04/on-url-shorteners.html&#34;&gt;all&lt;/a&gt; &lt;a href=&#34;http://laughingmeme.org/2009/04/03/url-shortening-hinting/&#34;&gt;the&lt;/a&gt; &lt;a href=&#34;http://www.scripting.com/stories/2009/03/07/solvingTheTinyurlCentraliz.html&#34;&gt;discussion&lt;/a&gt; around &lt;a href=&#34;http://en.wikipedia.org/wiki/List_of_URL_redirection_services&#34;&gt;URL shorteners&lt;/a&gt;, &lt;a href=&#34;http://digg.com/tools/diggbar&#34;&gt;Diggbar&lt;/a&gt;, &lt;a href=&#34;http://daringfireball.net/2009/04/how_to_block_the_diggbar&#34;&gt;blocking&lt;/a&gt; &lt;a href=&#34;http://farukat.es/journal/2009/04/225-javascript-diggbar-killer-not-blocker&#34;&gt;it&lt;/a&gt;, and the &lt;a href=&#34;http://revcanonical.appspot.com/&#34;&gt;rev&lt;/a&gt;=&lt;a href=&#34;http://twitter.com/kevinmarks/status/1448424167&#34;&gt;canonical&lt;/a&gt; proposal, I decided to implement a URL shortening service on this blog with the least effort possible. This probably won’t impact you just yet, but when &lt;a href=&#34;http://simonwillison.net/2009/Apr/11/revcanonical/&#34;&gt;tools&lt;/a&gt; become more popular and sophisticated, it would hopefully eliminate the need for &lt;a href=&#34;http://tinyurl.com/&#34;&gt;tinyurl&lt;/a&gt;, &lt;a href=&#34;http://bit.ly/&#34;&gt;bit.ly&lt;/a&gt;, etc.&lt;/p&gt;
&lt;p&gt;Since the blog runs on &lt;a href=&#34;http://wordpress.org/&#34;&gt;WordPress&lt;/a&gt;, every post has an ID. The short URL for any post will simply be &lt;code&gt;http://www.s-anand.net/the_ID&lt;/code&gt;. For example, &lt;code&gt;http://s-anand.net/17&lt;/code&gt; is a link to post on &lt;a href=&#34;https://www.s-anand.net/blog/ubuntu-8-10-on-a-dell-latitude-d420/&#34;&gt;Ubuntu on a Dell Latitude D420&lt;/a&gt;. At 21 characters, it’s roughly the same size as most &lt;a href=&#34;http://dooleyonline.typepad.com/dooley_post/2009/02/comparison-of-url-shorteners.html&#34;&gt;URL shorteners&lt;/a&gt; could make it.&lt;/p&gt;
&lt;p&gt;The code is easy: just one line added to index.php:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;link rev=&amp;quot;canonical&amp;quot; href=&amp;quot;http://s-anand.net/&amp;lt;?php the_ID(); ?&amp;gt;&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;… and one line in my .htaccess:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;RewriteRule ^([0-9]+)$ blog/?p=$1 [L,R=301,QSA]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Hopefully someone will come up with a WordPress plugin some time soon that does this. Until then, this should work for you.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>WordPress themes on Live Writer</title>
      <link>https://www.s-anand.net/blog/wordpress-themes-on-windows-live-writer/</link>
      <pubDate>Sun, 08 Mar 2009 01:27:20 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/wordpress-themes-on-windows-live-writer/</guid>
      <description>&lt;p&gt;One of the reasons I moved to WordPress was the ability to write posts offline, for which I use &lt;a href=&#34;http://download.live.com/writer&#34;&gt;Windows Live Writer&lt;/a&gt; most of the time. The beauty of this is that I can preview the post &lt;strong&gt;exactly&lt;/strong&gt; as it will appear on my site. Nothing else that I know is as &lt;a href=&#34;http://en.wikipedia.org/wiki/WYSIWYG&#34;&gt;WYSIWYG&lt;/a&gt;, and it’s very useful to be able to type knowing exactly where each word will be.&lt;/p&gt;
&lt;p&gt;The only hitch is: if you write your own &lt;a href=&#34;http://wordpress.org/extend/themes/&#34;&gt;WordPress theme&lt;/a&gt;, Live Writer probably won’t be able to detect your theme — unless you’re an expert theme writer.&lt;/p&gt;
&lt;p&gt;I hunted on Google to see how to get my theme to work with Live Writer. I didn’t find any tutorials. So after a bit of hit-and-miss, I’m sharing a quick primer of what worked for me. If you don&amp;rsquo;t want to go through the hassle, you can always call on professionals who are adept at services like &lt;a href=&#34;https://www.littlebluedeerdesign.com/&#34;&gt;professional custom website design&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Open any post on your blog (using your new theme) and save that as &lt;code&gt;view.html&lt;/code&gt; in your theme folder. Now replace the page’s title with {post-title} and the page’s content with {post-body}. For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;{post-title}&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{post-body}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is the file Live Writer will be &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/bb463261.aspx&#34;&gt;using as its theme&lt;/a&gt;. This page will be displayed exactly as it is by Live Writer, with {post-title} and {post-body} replaced with what you type. You can put in anything you want in this page — but at least make sure you include your CSS files.&lt;/p&gt;
&lt;p&gt;To let Live Writer know that &lt;code&gt;view.html&lt;/code&gt; is what it should display, copy WordPress’ &lt;code&gt;/wp-includes/wlw-manifest.xml&lt;/code&gt; to your theme folder and add the following lines just before &lt;code&gt;&amp;lt;/manifest&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;WebLayout
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;http://msdn.microsoft.com/en-us/library/bb463263.aspx&#34;&gt;Live Writer searches for wlmanifest.xml&lt;/a&gt; in the &lt;code&gt;&amp;lt;link rel=&amp;quot;wlmanifest&amp;quot;&amp;gt;&lt;/code&gt; tag of your home page. Since WordPress already links to its default &lt;code&gt;wlwmanifest.xml&lt;/code&gt;, we need remove that link and add our own. So add the following code to your &lt;code&gt;functions.php&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;my_wlwmanifest_link&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;echo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;remove_action&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;wp_head&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;wlwmanifest_link&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;add_action&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;wp_head&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;my_wlwmanifest_link&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That’s it. Now if you add your blog to Live Writer, it will automatically detect the theme.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://yuntian.name/?p=228&#34;&gt;Windows Live Writer 向 DEDECMS 发文章 | 快乐生活，快乐工作&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;30 Apr 2009 8:39 am&lt;/em&gt; &lt;em&gt;(pingback)&lt;/em&gt;:
[&amp;hellip;] WordPress themes on Live Writer [&amp;hellip;]&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.websitesare.us&#34;&gt;San Diego Web Design&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;22 Jun 2009 9:04 pm&lt;/em&gt;:
Note to my first post as it doesn&amp;rsquo;t show correctly:
What I did is I ended up adding the part between the tags to the regular wlwmanifest.xlm file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://goodinformation&#34;&gt;vivek&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;15 Jun 2009 6:23 am&lt;/em&gt;:
Hi,
Thanks great information&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.websitesare.us&#34;&gt;San Diego Web Design&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;22 Jun 2009 9:02 pm&lt;/em&gt;:
Thank you, thank you, thank you! I was trying for hours to fix this before I found your post! Actually, the way you described it didn&amp;rsquo;t exactly work for me (I guess I did something wrong with the paths), but I ended up just adding the
WebLayout
with the absolute path to the regular wlwmanifest.xlm inside the includes folder and now it works!
Thanks again, your post was the only one describing this problem and helping me fix it!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;shawn&lt;/strong&gt; &lt;em&gt;29 Jan 2010 7:37 pm&lt;/em&gt;:
I was having this issue today and came across this page. I came up with a very simple fix that requires no coding.
When setting up your blog in WLW, go to your admin settings in the wordpress dashboard and temporarily set your &amp;ldquo;Reading&amp;rdquo; settings to &amp;ldquo;Front page displays -&amp;gt; Your latest posts &amp;ldquo;. WLW will successfully download the theme, then set your Front page displays back to your custom setting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.zimmi.cz&#34;&gt;zimmi&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;27 Jan 2010 7:53 pm&lt;/em&gt;:
What if it still doesn&amp;rsquo;t work? Anything else I can try?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S&lt;/strong&gt; &lt;em&gt;15 Jul 2010 5:45 pm&lt;/em&gt;:
Thank you so much!!!!!!!!!! this worked.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.girls-information.com&#34;&gt;girls information&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;27 Sep 2010 7:19 am&lt;/em&gt;:
this worked for me tanks for sharing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.eyes2design.com/flogging-and-blogging/graphene-child-themes-and-live-writer&#34;&gt;Graphene, Child Themes, and Live Writer - Eyes2Design&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;28 Jul 2012 4:57 am&lt;/em&gt; &lt;em&gt;(pingback)&lt;/em&gt;:
[&amp;hellip;] came across this page by &lt;a href=&#34;https://www.s-anand.net&#34;&gt;www.s-anand.net&lt;/a&gt; which helped me a lot in understanding how Live Writer and WordPress get along together. So follow [&amp;hellip;]&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
  </channel>
</rss>
