Discourse is a SPA. You can’t just slap a script that now on the onLoad as that won’t work. You will need to hook into our API endpoints. Check Developer’s guide to Discourse Themes
Falco
(Falco)
9
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Issues on loading a js asset from a Theme Component | 18 | 934 | September 28, 2023 | |
| Defer loading JavaScript in Themes and Components | 4 | 1998 | April 7, 2022 | |
| Question about web app loading | 1 | 105 | March 25, 2025 | |
| Need help with theme component Github | 6 | 201 | September 17, 2024 | |
| When to switch themes/plugins to `.gjs`? | 27 | 677 | January 5, 2026 |