can one access the post type (MD, ipynb,...) in the template?

19 views
Skip to first unread message

Arun Persaud

unread,
Dec 4, 2020, 11:29:44 AM12/4/20
to nikola-discuss
Hi

just getting started with Nikola. It looks great! I really like that you can mix markdown, org-mode, and ipython notebooks!

I'm wondering, if there is a way to access the type of the post inside the templates. For example, I would like to only show the source link for ipython notebooks, but not for the other types.

Thanks

Arun

Chris Warrick

unread,
Dec 4, 2020, 4:53:43 PM12/4/20
to Nikola—Discuss
> --
> 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/ba3cdadb-2aea-4512-a2e2-a644e8af90d0n%40googlegroups.com.

You could access post.compiler.name in the template.

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

Arun Persaud

unread,
Dec 6, 2020, 12:21:09 PM12/6/20
to nikola-discuss

That worked! Exactly what I was looking for.

Thanks

Arun
Reply all
Reply to author
Forward
0 new messages