Could I get a bit more detail on how to put the function in GLOBAL_CONTEXT and how to call it from a page please ?
Thanks ! Le vendredi 28 octobre 2022 à 14:53:46 UTC+2, Maxime Garnier a écrit : > Thanks I'll try that ! Or maybe consider switching to reST if the include > works better ! > > Le mercredi 26 octobre 2022 à 23:42:17 UTC+2, [email protected] a écrit : > >> On Fri, 21 Oct 2022 at 09:56, Maxime Garnier <[email protected]> >> wrote: >> > >> > Thanks for your answer! Seems like a bit of work. >> > Would it be easier to read the txt files and images from the page >> itself (and not the template)? >> >> Pages can't do that, in general. You can use a custom shortcode or a >> reST include (if both files are reST). >> >> > How would I go about writing a Python function in conf.py and calling >> it from the page? >> >> Write a function as usual, and then put it in GLOBAL_CONTEXT ({"foo": >> foo}). >> >> -- >> 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/45fd3fa9-d614-4bc5-8130-860a48cb7cc3n%40googlegroups.com.
