Modified URLs and added button to share on LinkedIn (#5306)
- Removed the env variable and added the current URL in contributor's page - Added button to share on LinkedIn on contributor's profile - Fixed absolute image URL for release API --------- Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
This commit is contained in:
@ -23,14 +23,24 @@ export async function GET() {
|
||||
latestGithubRelease.tagName,
|
||||
);
|
||||
|
||||
const formattedReleasesNotes = visibleReleasesNotes.map((releaseNote) => ({
|
||||
...releaseNote,
|
||||
publishedAt: getGithubReleaseDateFromReleaseNote(
|
||||
githubReleases,
|
||||
releaseNote.release,
|
||||
releaseNote.date,
|
||||
),
|
||||
}));
|
||||
const formattedReleasesNotes = visibleReleasesNotes.map((releaseNote) => {
|
||||
const updatedContent = releaseNote.content.replace(
|
||||
/!\[(.*?)\]\((\/images\/.*?)\)/g,
|
||||
(match, altText, imagePath) => {
|
||||
return ``;
|
||||
},
|
||||
);
|
||||
|
||||
return {
|
||||
...releaseNote,
|
||||
content: updatedContent,
|
||||
publishedAt: getGithubReleaseDateFromReleaseNote(
|
||||
githubReleases,
|
||||
releaseNote.release,
|
||||
releaseNote.date,
|
||||
),
|
||||
};
|
||||
});
|
||||
|
||||
return Response.json(formattedReleasesNotes);
|
||||
} catch (error: any) {
|
||||
|
||||
Reference in New Issue
Block a user