diff --git a/src/components/AddressBar.astro b/src/components/AddressBar.astro index 8ad00aa..ea81770 100644 --- a/src/components/AddressBar.astro +++ b/src/components/AddressBar.astro @@ -27,9 +27,15 @@ const form = new FormGroup([ value: "Get cozy!", }} /> - Star on GitHub + 📚 Library + • + ⭐️ GitHub + diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index d335b3a..c86b688 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -18,7 +18,6 @@ const { title } = Astro.props;
- Home
diff --git a/src/pages/index.astro b/src/pages/index.astro index 824a5e9..87ab057 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -7,7 +7,7 @@ import Library from "../components/Library.astro"; const params = Astro.url.searchParams; const url = params.get('url') || ''; -let article: ArticleData; +let article: ArticleData | null; let skipSave; const error = { @@ -16,7 +16,11 @@ const error = { } try { - article = await extract(url) || error; + article = await extract(url); + if (!article ) { + article = error; + skipSave = true; + } } catch { article = error; skipSave = true; @@ -34,5 +38,5 @@ if (url === '') { - +