${escapeHtml(post.title)}
${renderMarkdown(post.content)}
import type { BlogPost } from '../types.js' import { putRecord } from '../lib/auth.js' import { renderMarkdown } from '../lib/markdown.js' import { escapeHtml } from '../lib/utils.js' import { renderDiscussionLink, loadDiscussionPosts, getAppUrl } from './discussion.js' function formatDate(dateStr: string): string { const date = new Date(dateStr) return date.toLocaleDateString('ja-JP', { year: 'numeric', month: '2-digit', day: '2-digit', }) } 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 `