-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Astro.js support #1662
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@sachinchoolur do you have a official docs how to use the plugin for the Astro project? with .astro file? I tried following @cengique (without /vue) code, and getting
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@monaye we have a working example here if you want to compare your approach: https://github.com/TAP-GGC/tap-ws1-astro-agnosticui/blob/main/src/components/astro/Gallery.astro
I think this approach will not work because the Javascript part in Astro files are dehydrated and only get executed during compilation and then they disappear once the page is rendered. If you want active Javascript in Astro pages, you need to put them inside |
Summary
Usage example of Lightgallery with Vite-based frameworks (Next.js, Astro.js, ...)
Basic example
We just got LightGallery to work under Astro.js. Not sure this is the best way, but it's a working example. Vue.js examples from the website somehow didn't work and the StackBlitz demo was also old/broken.
Motivation
Easier integration with new frameworks.
The text was updated successfully, but these errors were encountered: