${escapeHtml(post.title)}
${escapeHtml(post.content)}
import type { BlogPost } from '../types.js' import { putRecord } from '../lib/auth.js' function formatDate(dateStr: string): string { const date = new Date(dateStr) return date.toLocaleDateString('ja-JP', { year: 'numeric', month: '2-digit', day: '2-digit', }) } function escapeHtml(str: string): string { return str .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') } export function mountPostList(container: HTMLElement, posts: BlogPost[]): void { if (posts.length === 0) { container.innerHTML = '
No posts yet
' return } const html = posts.map(post => { const rkey = post.uri.split('/').pop() return `