--- import { ArticleData, extract } from "@extractus/article-extractor"; import AddressBar from "../components/AddressBar.astro"; import Post from "../components/Post.astro"; import Layout from "../layouts/Layout.astro"; import Library from "../components/Library.astro"; const params = Astro.url.searchParams; const url = params.get('url') || ''; let article: ArticleData | null; let skipSave; const error = { title: "Something is not right", content: "

The article extractor did not get any result.

", } try { article = await extract(url); if (!article ) { article = error; skipSave = true; } } catch { article = error; skipSave = true; } if (url === '') { article = { title: "Welcome to Cozy 🧸", content: "

Enter a URL above to get started.

", url: '/' }; } ---