Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

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

Started by Kai 2 years ago · 4 replies · 208 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 Anna, 21 hours ago
2 67 25 minutes ago
Support · by gtx, 1 week ago
4 233 2 days ago
Support · by Paul Hodges, 2 weeks ago
13 283 5 days ago
Support · by Anna, 3 weeks ago
9 339 1 week ago
Support · by TomW, 2 weeks ago
4 192 2 weeks ago