--- import { extract } from "@extractus/article-extractor"; import { getParams } from "../utils"; import AddressBar from "../components/address-bar.astro"; import Post from "../components/post.astro"; import Layout from "../layouts/layout.astro"; // temporary default content while we don't have any good thing to put yet :) const defaultUrl = "https://github.com/ayoayco/cozy"; const params = getParams(Astro.url); const url = params?.url || defaultUrl; let article; try { article = await extract(url); } catch { article = { title: "Something is not right", content: "
The article extractor did not get any result.
", }; } ---