mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Fix urls to product updates in Latest Changes component (#6528)
This commit is contained in:
parent
92867925f1
commit
2b9011ea71
1 changed files with 6 additions and 1 deletions
|
|
@ -24,13 +24,18 @@ for (const file of files) {
|
|||
const { data } = matter(content);
|
||||
|
||||
if (data.title && data.date) {
|
||||
const pathname = file
|
||||
.replace('.mdx', '')
|
||||
.replace('(posts)/', '')
|
||||
.replace(/\/page$/, '');
|
||||
|
||||
changelogRecords.push({
|
||||
date: new Date(data.date).toLocaleDateString(undefined, {
|
||||
day: 'numeric',
|
||||
month: 'long',
|
||||
year: 'numeric',
|
||||
}),
|
||||
href: `https://the-guild.dev/graphql/hive/product-updates/${file.replace('.mdx', '')}`,
|
||||
href: `https://the-guild.dev/graphql/hive/product-updates/${pathname}`,
|
||||
title: data.title,
|
||||
description: data.description || '',
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue