Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Entire file content being used for SEO descriptions #1703

Merged
merged 3 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,20 @@
preferredPlatform.set($page.params.platform as Platform);
});

// cleaned service description without Markdown links.
$: serviceDescription = (data.service?.description ?? '').replace(
/\[([^\]]+)]\([^)]+\)/g,
'$1'
);

// the service description up to the first full stop, providing sufficient information.
$: shortenedDescription = serviceDescription.substring(0, serviceDescription.indexOf('.') + 1);

$: platform = $page.params.platform as Platform;
$: platformType = platform.startsWith('client-') ? 'CLIENT' : 'SERVER';
$: serviceName = serviceMap[data.service?.name];
$: title = serviceName + API_REFERENCE_TITLE_SUFFIX;
$: description = data.service?.description;
$: description = shortenedDescription;
$: ogImage = DEFAULT_HOST + '/images/open-graph/docs.png';
</script>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
The Teams service allows you to group users of your project and to enable them to share [read and write](/docs/advanced/platform/permissions) access to your project resources, such as database documents or storage files.
The Teams service allows you to group users of your project and share [read and write](/docs/advanced/platform/permissions) access to resources like database documents or storage files.

Each user who creates a team becomes the team owner and can delegate the ownership role by inviting a new team member. Only team owners can invite new users to their team.
Loading