Skip to content

Commit bf13719

Browse files
Refactor descriptions and improve Open Graph image rendering
Updated documentation descriptions for clarity and consistency. Enhanced the Open Graph image rendering logic to include a category field derived from the URL, improving contextual information in generated images.
1 parent aa3373a commit bf13719

5 files changed

Lines changed: 27 additions & 4 deletions

File tree

src/assets/duende-og-bg.png

-355 Bytes
Loading

src/components/duende-og-image.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,25 @@ const imageBase64 = `data:image/png;base64,${fs.readFileSync(filePath).toString(
1010
export async function duendeOpenGraphImage({
1111
title,
1212
description,
13+
url,
1314
}: RenderFunctionInput): Promise<React.ReactNode> {
15+
let category =
16+
url
17+
.match(/\/([\w-]+)\//)
18+
?.at(1)
19+
?.toLowerCase() ?? "";
20+
21+
const categoryMap: Record<string, string> = {
22+
bff: "BFF",
23+
identityserver: "IdentityServer",
24+
accesstokenmanagement: "Access Token Management",
25+
identitymodel: "IdentityModel",
26+
general: "General",
27+
"identitymodel-oidcclient": "IdentityModel OIDC Client",
28+
};
29+
30+
category = categoryMap[category] ?? "General";
31+
1432
return Promise.resolve(
1533
<div
1634
style={{
@@ -31,7 +49,12 @@ export async function duendeOpenGraphImage({
3149
"flex flex-col justify-end justify-items-start w-full h-full p-20",
3250
)}
3351
>
34-
<h1 style={twj("text-[75px] text-bold text-white")}>{title}</h1>
52+
{category && (
53+
<div style={twj("text-2xl italic font-bold text-gray-500 mt-4")}>
54+
{category}
55+
</div>
56+
)}
57+
<h1 style={twj("text-[70px] text-bold text-white")}>{title}</h1>
3558
<div style={twj("text-3xl text-bold mb-3 text-white")}>
3659
{description}
3760
</div>

src/content/docs/identityserver/quickstarts/4-entity-framework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Entity Framework Core For Configuration & Operational data"
2+
title: "Entity Framework Core: Configuration & Operational Data"
33
description: "Learn how to configure IdentityServer to use Entity Framework Core for storing configuration and operational data in a persistent database."
44
date: 2020-09-10T08:22:12+02:00
55
sidebar:

src/content/docs/identityserver/reference/stores/pushed-authorization-request-store.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Pushed Authorization Request Store"
3-
description: Documentation for the IPushedAuthorizationRequestStore interface which manages the storage, retrieval, and consumption of pushed authorization requests in the OAuth PAR flow.
3+
description: Interface for managing pushed authorization requests storage in OAuth PAR flow.
44
sidebar:
55
order: 110
66
redirect_from:

src/content/docs/identityserver/tokens/par.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Pushed Authorization Requests
3-
description: "A comprehensive guide to implementing Pushed Authorization Requests (PAR) in IdentityServer, an OAuth standard that enhances security by moving authorization parameters from the front channel to the back channel, with details on licensing, client usage, data storage, and configuration options."
3+
description: "Pushed Authorization Requests (PAR) in IdentityServer, an OAuth standard that enhances security by moving authorization parameters from the front channel to the back channel."
44
sidebar:
55
order: 175
66
redirect_from:

0 commit comments

Comments
 (0)