Skip to content

Commit

Permalink
Fix description generation and dedupe titles
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianMachado committed Sep 6, 2024
1 parent 5b51b36 commit 4db8888
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/articles/sso-azure-ad.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Setup Azure Active Directory SSO
sidebar_label: Azure AD Setup
---

Zuplo uses Auth0 to enable SSO for enterprise accounts who have purchased
Zuplo uses Auth0 to enable Azure SSO for enterprise accounts who have purchased
single-sign-on. Below you will find instructions on how to setup a new Azure AD
client to be used with Zuplo.

Expand Down
2 changes: 1 addition & 1 deletion docs/articles/sso-okta.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Setup Okta SSO
sidebar_label: Okta Setup
---

Zuplo uses Auth0 to enable SSO for enterprise accounts who have purchased
Zuplo uses Auth0 to enable Okta SSO for enterprise accounts who have purchased
single-sign-on. Below you will find instructions on how to setup Okta to be used
with Zuplo.

Expand Down
6 changes: 5 additions & 1 deletion src/app/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ export async function generateMetadata({
title: data.title,
// Take the first sentence as description, its typically the summary or
// introduction
description: source.split(".")[0],
description: source
.replace(/(?<=\[.+\])\(.+\)/, "") // Remove [link](url) from description
.replace("[", "") // Remove [ from start
.replace("]", "") // Remove ] from end
.split(".")[0], // Grab the first sentence
alternates: {
canonical: `/${params.slug.join("/")}`,
},
Expand Down

0 comments on commit 4db8888

Please sign in to comment.