How to use Template variables on markdown files

136 views
Skip to first unread message

Daniele “Mte90” Scasciafratte

unread,
May 19, 2023, 3:26:18 PM5/19/23
to nikola-discuss
Hi,
I am trying to write on the home page that is a markdown file the last 4 articles.
The problem in my case is that it is a markdown file and a page but the `posts` variable is not exposed.
There is a way to achieve what I need?

Roberto Alsina

unread,
May 19, 2023, 3:39:57 PM5/19/23
to nikola-...@googlegroups.com
You want the post-list shortcut. Something like this:

{{% post-list stop=5 %}}{{% /post-list %}}

--
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-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/04f1f6b1-ef1b-41ef-b02f-3b890fa84c57n%40googlegroups.com.

Roberto Alsina

unread,
May 19, 2023, 3:43:22 PM5/19/23
to nikola-...@googlegroups.com
Much, much more detail in the docs:

Daniele "Mte90" Scasciafratte

unread,
May 20, 2023, 6:41:35 AM5/20/23
to nikola-...@googlegroups.com

Thanks I searched but I didn't found it!

Daniele Scasciafratte - OpenSource MultiVersal Guy
daniele.tech - @Mte90Net - GitHub - Italian Linux Society Council member - Mozillian
Mozilla Reps, Mozilla TechSpeakers, WordPress Core Contributor, FSFE member,
LibreItalia member, Wikimedia Italia member and LUG Rieti founder.

You received this message because you are subscribed to a topic in the Google Groups "nikola-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nikola-discuss/3GqlpbHu8L8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/CALXDAfqEBsL9tU%3DxAifFRpLB8RUt2BucOEYH34qoYy22bDz8Rw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages