-
Notifications
You must be signed in to change notification settings - Fork 205
remove the "/" from the page URL #40
Comments
Hello, |
Sure, do you want me to email that file to you? I don't have any permalink setting in my configuration file, since I'm not using permalinks in this project. Everything is coded with a relative URL (because the same project might be pushed into different server folders or domains). As such, I don't think the configuration file will have any particularly interesting information. |
Christian, I'm just following up on this issue. Did you have any solutions for me? Thanks. |
Hello, As a matter of face, you can check it out on this very example of this repository Please tell me how it goes, thanks |
Thanks. But I'm not using the baseurl for my Jekyll site. I have a I just need to somehow modify the {url} property in the plugin. This is the searchResultTemplate: '
The {url} value that gets inserted has a forward slash, such as In other places in my theme, I used this replace filter to get rid of the wrote:
|
Always removing the slash would not be wise. |
Please check this out and tell me what you think and if it works for you: |
Awesome. Thanks for addressing this issue! However, I realize now that I'm an idiot. I didn't realize that the {url} "url": "{{ page.url | replace: '/','' }}", I just added the replace filter there. This actually fixes my problem. I just didn't communicate the issue very Tom blog: idratherbewriting.com On Mon, Aug 10, 2015 at 3:08 PM, christian-fei [email protected]
|
Aaaalright, now it makes sense :) |
I'm making my jekyll site relative, and designed to be deployed in a subdirectory off of a domain. This poses some problems with Jekyll-Search's ability to format correct links in the results.
When I click on a search result, the URL prepends a forward slash, like this:
/pageresult.html
As a result, the page doesn't load because I have my jekyll site in a directory such as domain/folder/subfolder/
When I click /pageresult.html, it goes to this:
domain/pageresult.html
instead of:
domain/folder/subfolder/pageresult.html
How can I remove the "/" before the page result? If the result would simply go to pageresult.html, it would load the page.
In the script, the searchResultTemplate shows this:
I tried to determine how {url} gets populated from jekyll-search.js, but I couldn't see how to apply any kind of filter to remove the "/". Can you help? Thanks,
Tom
The text was updated successfully, but these errors were encountered: