diff --git a/www/src/components/PageTitle.astro b/www/src/components/PageTitle.astro index ba71fa2f5f..ff1f673d0d 100644 --- a/www/src/components/PageTitle.astro +++ b/www/src/components/PageTitle.astro @@ -13,11 +13,13 @@ const { lastUpdated, entry: { data: { title, author }, + body, }, } = Astro.locals.starlightRoute; const slug = Astro.url.pathname.replace(/^\//, "").replace(/\/$/, ""); const isBlogPost = slug.startsWith('blog/'); +const isDocsPost = slug.startsWith('docs/'); --- { isBlogPost @@ -37,10 +39,49 @@ const isBlogPost = slug.startsWith('blog/'); : - {title} - { description && {description} } + + {title} + {isDocsPost ? ( + + Copy as Markdown + + ) : ( + + )} + + {description && {description}} } + +
{description}