instantpage/instant.page

Instant.page doesn't work well with Hugo

Closed this issue · 3 comments

Hugo uses pages like "mysite.com/about/" instant.page can't seem to handle that. Under that is a index.html.
Open network tab of dev tools here, and see failed to load response data: https://www.robinwils.com/about/

Hugo is a pretty popular static website generator, so support for it would be cool.

image
I implemented it like this. I took what was needed from the instant.page script for my own script. Previous link will no longer give those errors, because of this new code. I tried to understand the code, so that I could rewrite it from scratch.

heya @Robin-Wils - Instant.page works great with Hugo sites. I think you have something not setup correctly on your site. The links in the navbar are not ending with a / but the URLs which load when you click on them do. I'd suggest updating that to avoid HTTP redirects. You shouldn't need that code with ends with .html since your links don't have that anyway...

Thanks for the reply.

My custom logic has been working great since. I will probably just keep it, since it has been a while since I made that change. There was an error response I got at the time. Good that hugo is already supported though!