Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How to use the grav-plugin-assets plugin?

admin

Solved by AKshat View solution

Started by AKshat 8 years ago · 1 replies · 1001 views
8 years ago

I asked this question on the slack channel first but thought it would be better to post it in the community forums. Apologies in advance for the double post!

I looked at the grav-plugin-assets(https://github.com/getgrav/grav-plugin-assets) and as per my understanding it should allow me to inject custom css and scripts at the page level?

After installation I created a new post and added a simple script to it

{assets:inline_js}
console.log("hello world");
{/assets}

However when I run this page in my browser I don't see his script in the "source" of my page. Nor do I see the message printed on the console.

Am I using this plugin correctly? I double checked and the plugin is enabled in the admin. Also I tried to rebuild the cache but no luck......

Suggested topics

Topic Participants Replies Views Activity
Plugins · by DrPen, 1 month ago
2 478 1 month ago
Plugins · by renedebaaij, 2 months ago
1 350 1 month ago
Plugins · by Thomas, 1 month ago
1 375 1 month ago
Plugins · by complanar, 2 months ago
6 699 2 months ago
Plugins · by BenLaKnet, 2 months ago
1 642 2 months ago