Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Can I get rid of the Platform.js-File in the SourceCode of my Grav Website?

Started by Kai 2 years ago · 4 replies · 280 views
2 years ago

I not sure where this here is coming from:

HTML
...

<!--- Your global JavaScript code can go here -->

<script async charset="utf-8" src="https://cdn.embedly.com/widgets/platform.js"></script>

...

But I would like to get rid of it or maybe import it into my File System and staticly reference it.

I am using the Quark Open Publishing Theme. Is this related to this or is it Grav specific?

Maybe someone already did it and can help me.

2 years ago

Okay, the Creator of the Plugin said he wont fix this nor will he provide a way to make it customizable.

My Question would now be if there is a Hook on which I could subscribe to always hard-overwrite this URL with a local File-Path with the same File but provided from my Server?

2 years ago

Okay so for now (I hope I remeber when the Theme gets an Update to repeat this) I have changed the Theme Base Template and changed the script-import to:

<script async charset="utf-8" src="{{ url('theme://js/platform.js') }}"></script>

and placed the Script-File inside the JS-Path of the Theme. Works. Nice.

But the thing with an UpdateInstalled-Hook would be cool. Is this planned?

It would be easy to implement I think.

Suggested topics

Topic Participants Replies Views Activity
Support · by complanar, 6 days ago
6 140 16 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 52 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago