Repository navigation
Conversation
|
jdrueckert
left a comment
There was a problem hiding this comment.
This does work better than the one before. The links on both the homepage latest blog cards as well as on the default blog list page cards work. However, it still breaks for the blog list page cards if you filter the cards.
| console.log(edge.node.fields.date); | ||
| createPage({ | ||
| path: `/blog${edge.node.fields.slug}`, | ||
| path: `/blog${edge.node.fields.slug}-${edge.node.fields.date.replace(/[-T:.Z]/g, '-').substring(0, 10)}`, |
There was a problem hiding this comment.
Prettier would prefer that with newlines like you did in BlogList.jsx
|
Closing: the site moved from Gatsby to Astro in #263, so the files this changes (gatsby-node.js and the Gatsby templates) no longer exist and the branch can't be merged. Thanks for the work. If the duplicate-link problem still shows up on the new site, please open an issue or a new PR against the Astro code. |
|
Closing, and sorry for the earlier boilerplate comment. The slug collision this guards against cannot happen today: all blog titles are unique, and the Astro site (#263) derives the slug from the title. Appending the date to every URL would also break every existing blog link. If duplicate titles become a risk, a build-time uniqueness check is the better guard. Thanks for the work, @Rukki13. |
|
thank you @Rukki13 for this!! |




No description provided.