import { sha256 } from "https://denopkg.com/chiefbiiko/sha256@v1.0.0/mod.ts"; export interface XeblogTootProps { url: string; } export default function XeblogToot({ url }: XeblogTootProps) { const tootHash = sha256(url + ".json", "utf8", "hex"); const tootJSON = (new TextDecoder("utf-8")).decode( Deno.readFileSync(`./src/_data/toots/${tootHash}.json`), ); const toot = JSON.parse(tootJSON); const userHash = sha256(toot.attributedTo + ".json", "utf8", "hex"); const userJSON = (new TextDecoder("utf-8")).decode( Deno.readFileSync(`./src/_data/users/${userHash}.json`), ); const user = JSON.parse(userJSON); return ( <>