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.

Plugins

Assets plugin and blog index/item pages

Started by ayrtbh 9 years ago · 1 replies · 584 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 Rene, 1 week ago
2 44 1 week ago
Plugins · by Xavier, 4 weeks ago
2 54 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago