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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

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

Started by Kai 1 year ago · 4 replies · 122 views
1 year 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.

1 year 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?

1 year 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 Thomas, 1 week ago
2 60 16 hours ago
Support · by Anna, 3 days ago
2 66 19 hours ago
Support · by Justin Young, 20 hours ago
1 34 20 hours ago
Support · by Duc , 1 week ago
2 70 6 days ago
Support · by Colin Hume, 1 week ago
2 61 6 days ago