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

Jekyll algolia url does not include basehostname #183

Open
shikon opened this issue Oct 14, 2021 · 4 comments
Open

Jekyll algolia url does not include basehostname #183

shikon opened this issue Oct 14, 2021 · 4 comments

Comments

@shikon
Copy link

shikon commented Oct 14, 2021

Original issue: mmistakes/minimal-mistakes#3199

I want to report a bug:

After building my website the search works however clicking on the result only redirect to subpath and excludes the basepath.

What is the current behavior?

Redirect to subpath only

What is your expected behavior?

redirect to hostname/subpath

Git repository to reproduce the issue:

https://github.com/shikon/shikon.github.io/tree/source

Ruby version used:

2.7.2p137

Jekyll version used:

4.2.1

@Haroenv
Copy link
Contributor

Haroenv commented Oct 14, 2021

I think relevant code is here:

@shikon
Copy link
Author

shikon commented Oct 14, 2021

So do you suggest me to hardcode my hostname there?

I am confused why it is not correctly adding my basehostname to the url, while jekyll works fine and hence has the required information to link to the correct paths. It probably has to do something with me locally building all the files.

[edit]
Whenever I add any string
url: "mystring" + url(file)
it becomes.

hostname/mystring/subpath
so:
https://mywebsite.com/mystring/subpath

if the string is empty i still get the same issue that it only redirects to
https://subpath

@Haroenv
Copy link
Contributor

Haroenv commented Oct 15, 2021

I meant that you could take a look inside the code of the plugin and see if base hostname needs to be added somewhere where we're manipulating the URL @shikon. You could then make a pull request to add the base. Thanks!

@shikon
Copy link
Author

shikon commented Oct 16, 2021

Well I tried looking into it a bit, but me for its not clear where any manipulations of the url part happens.
At least not inside this code.
all i can find in this file
def self.url(file) file.url end
And neglible content in other files.

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