Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect metadata.json url #7

Open
Timosav opened this issue May 15, 2023 · 2 comments
Open

Incorrect metadata.json url #7

Timosav opened this issue May 15, 2023 · 2 comments

Comments

@Timosav
Copy link

Timosav commented May 15, 2023

Hi!

It's me again.
I've been curious to implement the latest version of your great library!

However, I encountered a little issue when hosting the data.

image

It looks like the URL is not correctly inferred.

After a little investigation, I guess that the issue comes from here:

const metadataUrl = `${innerUrl}/metadata.json`;

Where the innerUrl already has a /

const innerUrl = `${searcherOptions.url}${indexVer}/`;

For an obscure reason, no problem for local dev, but once deployed, the search-ui fails to load the data :/

@ang-zeyu
Copy link
Owner

Thanks for the catch! And even pinpointing the exact line.

I've just released a new version with extra / removed.

For an obscure reason, no problem for local dev, but once deployed, the search-ui fails to load the data :/

I'm guessing it's based on the server. (Github pages seems to be doing some auto-correction for example)

I'll leave this open to make a note of updating the e2e tests to handle this.

@Timosav
Copy link
Author

Timosav commented May 16, 2023

Thanks for updating it so fast 😄

I'll continue the update right now thanks to you !

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

No branches or pull requests

2 participants