On Mon, 4 May 2020 at 17:46, Steve <gp6...@gmail.com> wrote: > > Why does "title" work but not "slug"? > > <!-- > .. title: Test templated > .. slug: test-templated > .. date: 2020-05-04 15:03:43 UTC > .. tags: > .. category: > .. link: > .. description: > .. type: text > --> > > {{% 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 <gp6...@gmail.com> wrote: > > 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 parse the > slug value out of the header via awk in order to output it. Convoluted but > it could work if I can get a reference to the filename being processed. It’s a one-time shell command (not part of any build process) that creates the required shortcode file. You can use a text editor or anything, but this `echo` command was meant to show what to put where. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CAMw%2Bj7Ja6hJY6xq_2LJHsCN-YH8KTFYnYjzBSXXonDwg4oQHkA%40mail.gmail.com.