Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Assets plugin and blog index/item pages

Started by ayrtbh 9 years ago · 1 replies · 821 views
9 years ago

Hi all,

I'd like to use different css and js for every post of a blog. For quick testing some jQuery plugins or other css tricks and posting them through the Grav blog system.

The problem is after I add asset code into my blog post(which is based on "item.html.twig"):

CSS
{assets:inline_css}
a {color: red !important;}
{/assets}

[a test link]("https://getgrav.org")

all my blog index page 's a tag turn red, but when I click in the post page, the link goes back to the custom.css setting which is black with underline. It seems that my assets codes are only effective in blog index page, but not in the single post page(which I prefer).

the blog index page:
http://changcun.wang/blog/
the single blog post page which is using the assets code:
http://changcun.wang/blog/articles/test

Thanks for any help!

9 years ago

problem solved,
it's a problem only happens in assets plugin,
shortcode-assets works well.

Suggested topics

Topic Participants Replies Views Activity
Plugins · by complanar, 2 weeks ago
6 359 1 week ago
Plugins · by BenLaKnet, 2 weeks ago
1 179 2 weeks ago
Plugins · by complanar, 1 month ago
2 461 4 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 746 2 months ago
Plugins · by Mathieu Lecouturier, 2 months ago
3 582 2 months ago