Skip to content

fix: Unique blog link#244

Open
Rukki13 wants to merge 6 commits into
MovingBlocks:masterfrom
Rukki13:unique-blog-link
Open

fix: Unique blog link#244
Rukki13 wants to merge 6 commits into
MovingBlocks:masterfrom
Rukki13:unique-blog-link

Conversation

@Rukki13

@Rukki13 Rukki13 commented May 11, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@Rukki13 Rukki13 mentioned this pull request May 11, 2024
@Rukki13 Rukki13 changed the title Unique blog link fix: Unique blog link May 11, 2024
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@jdrueckert jdrueckert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread gatsby-node.js
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)}`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prettier would prefer that with newlines like you did in BlogList.jsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants