> On Mon, Oct 2, 2017 at 5:10 PM, Robert Munteanu <romb...@apache.org> wrote: >> ...By reading the discussion at [1] it seems that we have to implement >> this ourselves in our templates - there is no placeholder support for >> articles...
I have implemented a basic version of this and used it as an example in index.md : https://github.com/apache/sling-site/commit/dbae75cbed98d63b15c0499eeb09c6e5eb47a900 (Groovy regexp replacement with closure FTW ;-) (and I fixed the bogus content.expandVariables test later) Note the expandVariables=true front matter variable, if that's not set there's no replacement, so there's no risk of conflicts with existing content. The values come from the pageVariables map in page.tpl - in my simple example config.blog_subtitle comes from jbake.properties, we can add variables there as needed, preferably with a sling. prefix like "sling.foo" which becomes sling_foo in the Groovy code. Missing variables generate a MISSING_PAGE_VARIABLE marker in the output. -Bertrand