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

Published Evidence site is getting 404 on subpages #6

Open
aaronsteers opened this issue Mar 13, 2023 · 5 comments
Open

Published Evidence site is getting 404 on subpages #6

aaronsteers opened this issue Mar 13, 2023 · 5 comments

Comments

@aaronsteers
Copy link

This works fine:

https://meltanolabs.github.io/jaffle-shop-template/

But the pages that are generated render a 404 when clicked on or when the user hovers over the page title.

It looks like the pages are trying to get

https://meltanolabs.github.io/Philadelphia/
https://meltanolabs.github.io/Brooklyn/

instead of

https://meltanolabs.github.io/jaffle-shop-template/Philadelphia/
https://meltanolabs.github.io/jaffle-shop-template/Brooklyn/

@archiewood
Copy link

archiewood commented Mar 14, 2023

I suspect (as a workaround) you could change your paths to be relative to the page they are on

select
    location_name as city,
    ‘./‘+location_name as city_link,
    sum(order_total) as revenue

from ${orders}

group by 1

i think evidence would then build those pages correctly, and the links would work.

@archiewood
Copy link

archiewood commented Mar 14, 2023

But agree that it currently works oddly with GitHub pages where the base of evidence is is not /

@aaronsteers
Copy link
Author

aaronsteers commented Mar 14, 2023

@archiewood - Thanks very much for the pointer here. Replacing '/' with './' in the subpage list resolved the 404! 🙌 Thank you!!

a1d0ffe

- [{revenue.city}](/{revenue.city})
+ [{revenue.city}](./{revenue.city})

FWIW, I also tested in my local machine where everything is hosted from root (`localhost), and there also the new relative paths work great. 🚀

This fixes the 404, but I notice that the breadcrumb parsing for the subpage seems to still be confused on these subpages:

Perhaps Evidence is trying to parse '/jaffle-shop-template/Brooklyn' as a city name?

Screenshot

image

Is there are workaround for those, or will this require more broad support in Evidence for non-root publish locations?

@archiewood
Copy link

You've actually uncovered another v14 bug 🐛

@archiewood
Copy link

evidence-dev/evidence#691

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