-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Option to use Turbo to avoid page refreshes #136
Comments
@welpo Would love to work on this if you don't mind. One of the main challenges would be making existing scripts work on page change. |
Hey Donovan, I'm generally against adding JavaScript to tabi. Exceptions have been made for features that would be impossible without it (like the light/dark switch or comments). I'm not totally against Turbo, but I would need more info and time to tinker with this on my own. My first question would be about its implementation: would loading a |
Totally understandable! I implemented turbo support in my own branch that works for my use case. For scripts that depend on the DOM, you'd have to use |
If I understand correctly, scripts that depend on the DOM would need a dual implementation to be compatible with Turbo. Essentially, one version using standard events for when My top priority is keeping the codebase and development process as simple, lightweight, and JS-free as possible. From my understanding, integrating Turbo would require maintaining 4 files for any DOM-dependent JavaScript: one version using standard events, another triggering on the The minor improvements from Turbo may not outweigh the drawbacks, as I see it. I might reconsider this if Zola brings in the capability to support non-HTML templates. @Jieiku, do you happen to have the link to the Zola issue where this was being discussed? I can't find it, and I remember you commented there. In any case, for now, I'd prefer to keep things as they are. Thank you for your understanding and your contributions. |
I have found more than a few use cases for being able to template javascript files. I don't have time to work on it right now. My initial attempt found some gotchas... like generating integrity hashes for js files that need to also be built via templates... I could tell it was going to take more time to implement and had to wait on it. Just started a big project at work, so won't have time for new features in abridge or adding this feature to Zola anytime soon. https://github.com/Jieiku/zola/tree/file-templates getzola/zola@995a0d3 (work in progress, never finished it, worked if subresource integrity hashes were not generated, also there's some hardcoded file paths here that I was using during testing.) |
That was the issue I was thinking of, thanks! No pressure at all, I was just looking for the discussion :) |
By the way, @donovanglover, you'll need to update the |
I did the minimal changes necessary to make turbo work on my site (including change Ultimately I'm interested in trying bun to see if I can get a cool turbo setup that works for my use case. Very different than the goals in tabi, so I plan to keep it in my fork. |
Feature Request
Summary
Turbo is a JavaScript library that turns static websites into interactive SPA-like ones.
Motivation
The website will be perceived to load faster for users since a page refresh isn't necessary.
Detailed Description
<head>
var(--primary-color)
Additional Context
The Turbo website uses Turbo.
The text was updated successfully, but these errors were encountered: