11:18:08 <ChrisWarrick> KwBot: ping 11:18:08 <KwBot> ChrisWarrick: pong 11:19:36 <erdgeist> ChrisWarrick: Is there something like the opposite of teaser_only when accessing post.text()? I want to automatically insert the previewimage in the post at the teaser separator and thought I could render the post in two parts 11:19:54 <ChrisWarrick> erdgeist: you can do it yourself 11:20:12 <ChrisWarrick> erdgeist: https://github.com/Kwpolska/chriswarrick.com → conf.py 11:25:42 <erdgeist> Thanks 11:51:47 <KwBot> [nikola] Xeverous opened issue #3415: post object and/or more context information for Markdown and reST extensions https://github.com/getnikola/nikola/issues/3415 12:52:20 <KwBot> [nikola] Xeverous closed issue #3415: post object and/or more context information for Markdown and reST extensions https://github.com/getnikola/nikola/issues/3415 15:12:06 <erdgeist> ChrisWarrick: Took a look. That doesn't look right. This looks like something that should be in post.py or in a helper and probably have the TEASER_REGEXP itself be rendered by a template. But maybe I can do the splitting in post.tmpl 15:12:32 <ChrisWarrick> erdgeist: the way I do it is specific to my blog and my theme 15:13:03 <erdgeist> Understood, but this looks really useful and can be done genericly 15:13:04 <ChrisWarrick> erdgeist: you could do the splitting in post.tmpl if you use mako, but that will be ugly 15:14:07 <erdgeist> ChrisWarrick: And doing it in conf.py isnt ugly? ;) 15:14:26 <ChrisWarrick> erdgeist: arbitrary code in templates is wrong IMO 15:14:39 <erdgeist> you're right 15:15:56 <ChrisWarrick> erdgeist: conf.py is the easiest place to do it (and also compatible with jinja2) 18:04:33 <gour> nikola's support for having php files is really great...very easy to use custom scripts for forms, our multimedia archive (download counter) etc. 18:20:39 <erdgeist> ChrisWarrick: Can your def post_lead_format(post): render another template .. sort of recursively? 18:21:54 <ChrisWarrick> erdgeist: what do you mean? 19:12:37 <erdgeist> ChrisWarrick: You do a return '<div class="lead">' + lead + '</div></div>' + ptext and I want the three static strings before, in the center and after to be ... coming from a template, so I can actually insert a previewimage if it exists 19:13:23 <ChrisWarrick> erdgeist: you could possibly talk to the nikola templating machinery 19:13:54 <ChrisWarrick> erdgeist: I would just build and output HTML in Python 19:15:56 <erdgeist> ChrisWarrick: I.e. at least '</div></div>' should be dynamic. Well, actually I just need something that replaces TEASER_REGEXP by <a href="img.pn"><div class="someclasses"><img src="{$previewimage}.thumbnail.png"></div></a> 19:16:34 <ChrisWarrick> erdgeist: it shouldn’t be hard to modify this code to make that work 19:16:50 <erdgeist> ChrisWarrick: I could actually do that as a transformation on post.text() in the template, if there's a preview-image AND a TEASER_REGEXP 19:17:59 <ChrisWarrick> erdgeist: I’m not sure if you could do it easily 19:18:56 <erdgeist> ChrisWarrick: Well, easiest would be, if I could just ask post.text() for teaser text and main body seperately. Maybe I can put that in a plugin 19:19:21 <erdgeist> Anyway, thanks for the feedback! 19:25:48 <ChrisWarrick> erdgeist: you could do that, but then you do the regex twice, because tuples + templates don’t mix well