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 4.2.0 stopped overriding site.url, breaks lunr search result #2801

Closed
iveney opened this issue Jan 29, 2021 · 2 comments
Closed

jekyll 4.2.0 stopped overriding site.url, breaks lunr search result #2801

iveney opened this issue Jan 29, 2021 · 2 comments

Comments

@iveney
Copy link

iveney commented Jan 29, 2021

Originally posted here. After a bit of search, I think this is probably because Jekyll stopped overriding site.url

Additionally, we have stopped overriding the site.url to http://localhost:4000 in absolute URLs while developing via jekyll serve.

Environment

Expected behavior

In local deve (jekyll serve), clicking the search icon and type something, returned result should have proper URL as "http://localhost:4000/path". But now it is using site.url.

Steps to reproduce the behavior

  • Clone my gh page repo here
  • run bundle exec jekyll serve, open localhost:4000, click search and type something. Observe link is incorrect:

Ivan_Xiao

Other

@mmistakes
Copy link
Owner

Closing as this isn't a theme issue, Jekyll 4.2.0 changed the behavior of when it overrides site.url.

https://jekyllrb.com/news/2020/12/14/jekyll-4-2-0-released/

@iveney
Copy link
Author

iveney commented Jan 29, 2021

@mmistakes What's the reason to use absolute_url instead of relative_url in lunr-store.js though? Switching to relative_url seems fixing it for me (and compatible for older Jekyll).

As in other places such as archive-single.html I am seeing the<a/> is being added with {{ post.url | relative_url }} instead of absolute_url.

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

No branches or pull requests

2 participants