json()
        return searchIndex
      } catch (error) {
        console.error('Error loading search index:', error)
        return { posts: [] }
      }
    }

    function renderPost(post) {
      return `
        <article class="post-preview" data-tags="${post.tags.join(' ')}">
          <h2>
            <span class="post-date">${post.date}</span>
            <a href="${post.url}">${post.title}</a>
          </h2>
          ${post.tags.length ? `
            <div class="post-tags">
              ${post.