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

Speedtracker URL structure #6

Closed
mathieuhays opened this issue Oct 18, 2016 · 2 comments
Closed

Speedtracker URL structure #6

mathieuhays opened this issue Oct 18, 2016 · 2 comments
Labels

Comments

@mathieuhays
Copy link
Contributor

Hi,

First of all, I want to thank you for this great tool.

I just noticed that the visualisation layer modify the web address using the history API.
It looks great but it breaks the ability to share the url or reload the page.

I don't know if github has an option to redirect all traffic to the index but if it doesn't it might be worth considering a different url structure.

@eduardoboucas
Copy link
Member

Every profile has a directory with an index.html inside, so the correct URL for profile something will be http://root.url/something. This is totally fine if you use a custom domain and the site sits at the root of the domain (e.g. http://demo.speedtracker.org).

The issue here comes when the root of your dashboard is on a sub-directory (e.g. http://yourusername.github.io/speedtracker). Switching to profile something should link to http://yourusername.github.io/speedtracker/something, but it's blindly linking to /something, which means the end URL will be http://yourusername.github.io/something, which obviously isn't valid.

I don't think the solution to this is the introduction of a query parameter, as Jekyll wouldn't be able to read this. The profile selector just needs to form the URL correctly. There is a window.BASE_URL which contains the relative path to the root, which we can use to properly build the URLs.

I will close #8 as I don't think it's the right approach, and will look into fixing this asap (and coming up with a good versioning system and a way for people to update their dashboards).

Thanks for flagging this!

@mathieuhays
Copy link
Contributor Author

makes sense :)

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

No branches or pull requests

2 participants