timlrx / pliny

Create content rich websites with ease - built on next.js, contentlayer and tailwindcss
MIT License
293 stars 42 forks source link

Fix transforming internal urls to relative urls from algolia #159

Closed Adriel-M closed 7 months ago

Adriel-M commented 7 months ago

This fixes: https://github.com/timlrx/pliny/issues/158

You should return the item if it's an anchor or an internal link.

When it's not either of those, it is a valid url where you can transform the url and strip the hostname.

This could be extended by having a way to differentiate internal and external domains, maybe passing down siteMetadata.siteUrl to this component.

changeset-bot[bot] commented 7 months ago

🦋 Changeset detected

Latest commit: 949804e211e853063943c058439822b942f15211

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----- | ----- | | pliny | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

timlrx commented 7 months ago

Thanks for the fix!