Closed Firgrep closed 11 months ago
Interesting. I can't seem to get the same issue. Here's what I get:
Can you check your network tab for any failed requests? This is what it looks like for me:
So when I open the site in a new window (incognito just to be sure), and I click the search bar, it opens up as expected with the little white box inside the gray one.
But as soon as I click to enter the docs and try the search bar again, a non-interactive gray box opens.
I suspect this is something to do with the ViewTransitions. I think I heard somewhere that it may turn off javascript and that you have to do something extra in order to re-enable it. E.g. https://youtu.be/lsXqparnx24?si=ayV0NVg5OD6JpBSc&t=135 he says you have to add transition:persist
to the HTML element and any state attached to it. I'm sure there is more info about this.
I can confirm this does happen after a page switch, although I'm not sure why. As far as I can tell,transition:persist
can only be used with HTML elements. I've opened a support thread in the Astro Discord to see if it's possible to use a layout for all the markdown content. Hopefully this can make it easier to ensure that the JavaScript for the search functionality is executed on every page load.
The docs are now using Next.js, marking this issue solved.
Interesting choice! Looks very cool. I've also been trying out Nextra with a project I'm working on. Best of luck!
Nextra is definitely more production ready. I think you'll love it
Really smooth transition between pages on your docs website - very cool! But I notice the search bar isn't working. Just opens a gray box when you click it.