Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. 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 · 339 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 webmasterodp, 1 week ago
4 158 6 days ago
Support · by nwhitfield, 1 week ago
2 137 1 week ago
Support · by stell, 3 weeks ago
5 369 2 weeks ago
Support · by gravinator, 1 month ago
5 560 2 weeks ago
Support · by Gravver, 3 weeks ago
6 348 3 weeks ago