{
  "$type": "site.standard.document",
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreibouoi2vte43xobdv7mkt4d6ey3bst47zdykb2vpyooum7ztomilu"
    },
    "mimeType": "image/webp",
    "size": 16774
  },
  "path": "/2025-07-08-so-i-switched-back-to-wordpress/",
  "publishedAt": "2025-07-08T23:02:57.000Z",
  "site": "at://did:plc:ex23caczr45rodrfcxrwps6h/site.standard.publication/self",
  "tags": [
    "errata",
    "ghost",
    "website",
    "wordpress"
  ],
  "textContent": "After around six years dabbling with Ghost and static site builders I’ve migrated back to WordPress.\n\nFirst impressions of the wp-admin panel were “meh”. It’s not really changed in the last few years and it’s really not as nice as Ghost’s admin panel. It does the job, though.\n\nThe Gutenberg editor, however, is amazing. It’s such a massive improvement—at least from memory—over the old WYSWYG editor.\n\nTo get things just so, I’ve had to install a few plugins:\n\nYoast SEO\n\nAdvanced Custom Fields\n\nI’ve created an external_url field so that I can use it in the JSON feed 1.\n\nJSON Feed (by Manton Reece and Daniel Jalkut)\n\nCode Block Pro\n\nSecure Passkeys\n\nVarious plugins to add Fediverse tags to the <head> element\n\nActivityPub\n\nTo get footnotes to render correctly in RSS readers—i.e., appear as pop-ups—I’ve added the below code to functions.php:\n\nfunction clean_gutenberg_footnotes_for_rss($content) {\nif (!is_feed()) return $content;\n\n$refIndex = 1;\n$uuidToIndex = [];\n\n// Step 1: Replace <sup> references with numbered links and track mapping\n$content = preg_replace_callback(\n'/<sup data-fn=\"([^\"]+)\" class=\"fn\">\\s*<a[^>]*>(\\d+)<\\/a>\\s*<\\/sup>/i',\nfunction ($matches) use (&$uuidToIndex, &$refIndex) {\n$uuid = $matches[1];\nif (!isset($uuidToIndex[$uuid])) {\n$uuidToIndex[$uuid] = $refIndex++;\n}\n$n = $uuidToIndex[$uuid];\nreturn \"<sup id=\\\"fnr-{$uuid}\\\"><a href=\\\"#fn-{$uuid}\\\">{$n}</a></sup>\";\n},\n$content\n);\n\n// Step 2: Rewrite footnote section and replace ↩ links\n$content = preg_replace_callback(\n'/<ol class=\"wp-block-footnotes\">(.*?)<\\/ol>/is',\nfunction ($matches) use (&$uuidToIndex) {\n$footnotes = $matches[1];\n\npreg_match_all('/<li id=\"([^\"]+)\">(.*?)<\\/li>/is', $footnotes, $liMatches, PREG_SET_ORDER);\n\n$output = '<div class=\"footnotes\"><ol>';\n\nforeach ($liMatches as $li) {\n$id = $li[1];\n$rawText = $li[2];\n$n = $uuidToIndex[$id] ?? '?';\n\n// Replace ↩ <a> link with formatted Unicode arrow link\n$fixedText = preg_replace(\n'/<a[^>]+href=\"#' . preg_quote($id, '/') . '-link\"[^>]*>.*?<\\/a>/is',\n'<a href=\"#fnr-' . $id . '\" class=\"footnoteBackLink\" title=\"Jump back to footnote ' . $n . ' in the text.\">↩︎</a>',\n$rawText\n);\n\n$output .= '<li id=\"fn-' . esc_attr($id) . '\"><p>' . trim($fixedText) . '</p></li>';\n}\n\n$output .= '</ol></div>';\nreturn $output;\n},\n$content\n);\n\nreturn $content;\n}\nadd_filter('the_content', 'clean_gutenberg_footnotes_for_rss');\n\nFootnotes\n\nI'll add it to the RSS xml feed soon. ↩",
  "title": "So, I Switched (Back) To WordPress"
}