Re: [nikola-discuss] How to reference a metadata value in reStructuredText?

2020-05-04 Thread Chris Warrick
On Mon, 4 May 2020 at 17:46, Steve wrote: > > Why does "title" work but not "slug"? > > > > {{% template %}} > > The title is: ${post.slug()} > > {{% /template %}} > > ... rejected Title has its own function, but slug does not. Use: ${post.meta('slug')} On Mon, 4 May 2020 at 17:54, Steve wrot

Re: [nikola-discuss] How to reference a metadata value in reStructuredText?

2020-05-04 Thread Steve
What is the context for using* echo '${post.title()}' > shortcodes/foo.tmpl *? This is not restructured text, it would be some sort of shell escape that is recognized and executed during a build I suppose? I could not find this documented. If embedded shell hooks are possible, perhaps I could

Re: [nikola-discuss] How to reference a metadata value in reStructuredText?

2020-05-04 Thread Steve
Why does "title" work but not "slug"? {{% template %}} The title is: ${post.slug()} {{% /template %}} ... rejected -- 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

Re: [nikola-discuss] How to reference a metadata value in reStructuredText?

2020-05-04 Thread Roberto Alsina
And yes, the shortcode there HAS to say "template" :-) On Mon, May 4, 2020 at 12:05 PM Roberto Alsina wrote: > This works too: > > > > {{% template %}} > > The title is: ${post.title()} > > {{% /template %}} > ~ > > On Mon, May 4, 2020 at 11:03 AM Chris Warrick wrote: > >> On Mon, 4 May 2020 a

Re: [nikola-discuss] How to reference a metadata value in reStructuredText?

2020-05-04 Thread Roberto Alsina
This works too: {{% template %}} The title is: ${post.title()} {{% /template %}} ~ On Mon, May 4, 2020 at 11:03 AM Chris Warrick wrote: > On Mon, 4 May 2020 at 16:00, Steve wrote: > > > > Chris, thanks for the clue. I still have not escaped the room. Tried > with no avail: > > > > {{% po

Re: [nikola-discuss] How to reference a metadata value in reStructuredText?

2020-05-04 Thread Chris Warrick
On Mon, 4 May 2020 at 16:00, Steve wrote: > > Chris, thanks for the clue. I still have not escaped the room. Tried with > no avail: > > {{% post.title %}} > {{% post.data(title) %}} > {{% post.data title %}} You need to create templated shortcode, and use `post` inside it: echo '${post.title(

Re: [nikola-discuss] How to reference a metadata value in reStructuredText?

2020-05-04 Thread Steve
Chris, thanks for the clue. I still have not escaped the room. Tried with no avail: {{% post.title %}} {{% post.data(title) %}} {{% post.data title %}} On Saturday, May 2, 2020 at 11:07:44 AM UTC-4, Chris Warrick wrote: > > On Sat, 2 May 2020 at 17:03, Steve > > wrote: > > > > Chris, the