From 66c6dcaff2f1857a7fdbc831175430d807b60114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Thu, 26 Sep 2024 09:00:52 +0200 Subject: [PATCH 1/2] chore(deps-dev): bump starlight-blog from 0.12.0 to 0.13.0 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index c4a9c618..6f7ab5a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "linkedom": "^0.18.5", "parse-github-url": "^1.0.3", "reading-time": "^1.5.0", - "starlight-blog": "^0.12.0", + "starlight-blog": "^0.13.0", "starlight-links-validator": "^0.12.1", "starlight-showcases": "^0.2.0", "tsx": "^4.19.1", @@ -9335,9 +9335,9 @@ "dev": true }, "node_modules/starlight-blog": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/starlight-blog/-/starlight-blog-0.12.0.tgz", - "integrity": "sha512-SSNkBQIM6RrumGQQqOv76L5Lcefm6faU2+4armlgQh2zod24aOvuCGUcFi3F//DxOWvIx3WRb7X/VRqs3yNO8A==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/starlight-blog/-/starlight-blog-0.13.0.tgz", + "integrity": "sha512-AQi+5PdsgN/ltQh1j+F/crHLlBFwDUOKgW8H1GnzLUq2T6J7VaOVf62fmCfBDmymfBN4mOfIZuJXq5ZzY3pJmQ==", "dev": true, "dependencies": { "@astrojs/rss": "4.0.5", diff --git a/package.json b/package.json index 10e788b1..2b2987a6 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "linkedom": "^0.18.5", "parse-github-url": "^1.0.3", "reading-time": "^1.5.0", - "starlight-blog": "^0.12.0", + "starlight-blog": "^0.13.0", "starlight-links-validator": "^0.12.1", "starlight-showcases": "^0.2.0", "tsx": "^4.19.1", From 7e6c394740a3d2e56ebe9da55184d30e26f23a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Thu, 26 Sep 2024 09:22:04 +0200 Subject: [PATCH 2/2] . --- src/components/Head.astro | 5 +++-- src/components/Header.astro | 2 +- src/components/PageTitleThenReadingTime.astro | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/Head.astro b/src/components/Head.astro index f25d50e2..85382fa2 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -9,10 +9,11 @@ const filteredAstroPropsId = Astro.props.id.replace(/\/index./, '.'); // Force the og:image to be the index image for the homepage for these kind of pages: // - articles/tags/* +// - articles/authors/* // - 404 // - articles.* // - articles/[0-9]*/ -const isOgIndex = Astro.props.id.startsWith('articles/tags/') || Astro.props.id.startsWith('articles.') || /^articles\/\d+/.test(Astro.props.id) || Astro.props.id.startsWith('404'); +const isOgIndex = Astro.props.id.startsWith('articles/tags/') || Astro.props.id.startsWith('articles.') || /^articles\/\d+/.test(Astro.props.id) || Astro.props.id.startsWith('404') || Astro.props.id.startsWith('articles/authors/'); // Get the URL of the generated image for the current page using its // ID and replace the file extension with `.png`. @@ -24,7 +25,7 @@ const ogImageUrl = new URL( const { entry } = Astro.props; const { data } = entry; -const isArticle = Astro.props.slug.startsWith('articles/') && !Astro.props.slug.startsWith('articles/tags') && !Astro.props.slug.match('articles/[0-9]*$'); +const isArticle = Astro.props.slug.startsWith('articles/') && !Astro.props.slug.startsWith('articles/tags') && !Astro.props.slug.startsWith('articles/authors') && !Astro.props.slug.match('articles/[0-9]*$'); let articleSchema; if (isArticle) { diff --git a/src/components/Header.astro b/src/components/Header.astro index 367f032f..5c0bf208 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -3,7 +3,7 @@ import type { Props } from '@astrojs/starlight/props'; import Default from '@astrojs/starlight/components/Header.astro'; import ProgressScroll from './ProgressScroll.astro'; -const displayProgressScroll = Astro.props.slug.startsWith('guide') || Astro.props.slug.startsWith('articles/') && !Astro.props.slug.startsWith('articles/tags') && !Astro.props.slug.match('articles/[0-9]*$'); +const displayProgressScroll = Astro.props.slug.startsWith('guide') || Astro.props.slug.startsWith('articles/') && !Astro.props.slug.startsWith('articles/tags') && !Astro.props.slug.startsWith('articles/authors') && !Astro.props.slug.match('articles/[0-9]*$'); --- diff --git a/src/components/PageTitleThenReadingTime.astro b/src/components/PageTitleThenReadingTime.astro index dcda88cc..f35c4d6f 100644 --- a/src/components/PageTitleThenReadingTime.astro +++ b/src/components/PageTitleThenReadingTime.astro @@ -7,7 +7,7 @@ const { date } = Astro.props.entry.data; const { entry, lang } = Astro.props; const isGuide = Astro.props.slug.startsWith('guide'); -const displayReadingTime = (isGuide && date) || Astro.props.slug.startsWith('articles') && !Astro.props.slug.startsWith('articles/tags'); +const displayReadingTime = (isGuide && date) || Astro.props.slug.startsWith('articles') && !Astro.props.slug.startsWith('articles/tags') && !Astro.props.slug.startsWith('articles/authors'); const displayDate = date && isGuide; ---