On 6 March 2018 at 14:36, asmoth <asmoth...@gmail.com> wrote: > Thank you. > I managed to add the date by adding a "date-edit" metadata in the post, and > adding this part in the template : > > % if post.meta('date-edit'): > <p class="dateline" itemprop="datedit">Édité : > ${post.meta('date-edit')}</p> > % endif > > But I don't get how to get it formatted, would you know how to do it ?
First: use the name `updated`. This one is used internally, although the default templates don’t display it. If you use `updated`, you can use the post.formatted_updated function: % if post.updated != post.date: <p class="dateline">Édité : ${post.formatted_updated(date_format)}</p> % endif (Other names require manual use of date formatting functions.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.