Ares-X
(AresX)
15. März 2020 um 04:18
1
Discourse-Version: 2.4.1
Ich habe Discourse auf die neueste Version aktualisiert und festgestellt, dass einige im <head> hinzugefügte JavaScript-Skripte nicht im HTML-Quellcode angezeigt werden.
Beispielsweise wurde das Google Analytics-Skript über „CSS/HTML bearbeiten" hinzugefügt.
Warum passiert das? Ich bin sehr verwirrt.
Ares-X
(AresX)
15. März 2020 um 04:32
2
if i make the <script> wrong ,such as <script123> , then those code will show
if i change it back to normal <script>, disappear again
Johani
(Joe)
15. März 2020 um 05:04
3
It does not “disappear” it’s still there. What happens is that we pull all inline scripts and put them in one file for your theme.
discourse/app/models/theme_field.rb at main · discourse/discourse · GitHub
So, if you search the page-source for theme-javascript you should see something like this
This file will contain all of your inline scripts.
Also, Discourse has native support for Google Analytics, so why not use that?
Search the settings for Analytics
11 „Gefällt mir“
system
(system)
Geschlossen,
9. März 2024 um 08:11
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.