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

Tidy up search URL handling #56

Open
geealbers opened this issue Jul 18, 2019 · 4 comments
Open

Tidy up search URL handling #56

geealbers opened this issue Jul 18, 2019 · 4 comments
Assignees

Comments

@geealbers
Copy link
Member

Just posting this here so we don't lose track of it. From the email:

The URLs for search it’s a different issue, the URLs are not picking up the base url from hugo because the hrefs are relative and lunr is not picking that up for some reason but it would pick up the absolute URLs since that would be in the href.

I think it may be a lunr issue working with hugo and setting the urls to relative in the config and then checking the href for the path to the page.

All those need to work together for this deployment style and its not quite there.

Instead of setting a base URL I added a condition in applciatiion.js that would look for localhost or netlify in the host of the URL but if not serve this base path /publications/cva10

This works for now but still needs to be looked at to get it air tight with the pathing.

@naeluh
Copy link
Contributor

naeluh commented Jul 22, 2019

@geealbers I think my only one of my key issues here is the how we want the Netlify implementation to work. Should I be able to use the this https://cva10.netlify.com/ and https://www.getty.edu/publications/cva10/ ? or should this just work -> https://www.getty.edu/publications/cva10/. If that is the case then adding the baseURL will break https://cva10.netlify.com/ or we can do something like https://cva10.netlify.com/publications/cva10/ but I think for search to add these we need to add the baseURL param for HUGO. Let me see what I can find in terms of how lunr works when URLs are relative.

@geealbers
Copy link
Member Author

I think it's fine for us to break https://cva10.netlify.com/ once the publication is live. And in fact, it's a little weird that it's discoverable there at all. Is there a way to even deactivate that URL?

@naeluh
Copy link
Contributor

naeluh commented Jul 22, 2019

looking at this here -> #61

@naeluh
Copy link
Contributor

naeluh commented Jul 23, 2019

@geealbers ok cool I will take a look I think we can do something but I am not sure about deactivating it. So I think I will try and get this working with a baseURL and then that will solve the search issue. I will let you know once the pull request is ready.

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