minijinja as staticjinja replacement? #567
Unanswered
davidthewatson
asked this question in
Q&A
Replies: 2 comments
-
I'm not sure how to help here or even what you are trying to accomplish or why. Is the goal to just replace a Python library with a Rust library or to port the entire tool to Rust? Either way I think the question is: why? :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
To answer your question: no, not port; IIUC, after re-reading the mini
jinja README and the links to HTML generation derivative tools, mini jinja
is a near drop-in replacement for static jinja where there may be a few
code and data differences to beware of at the edges, i.e. assuming direct
template compatibility and parse-ability, it should be no-code, low-code,
alignment of templates, perhaps a Makefile and connective shell scripting.
Does that make sense?
…On Sun, Sep 1, 2024 at 3:10 PM Armin Ronacher ***@***.***> wrote:
I'm not sure how to help here or even what you are trying to accomplish or
why. Is the goal to just replace a Python library with a Rust library or to
port the entire tool to Rust? Either way I think the question is: why? :)
—
Reply to this email directly, view it on GitHub
<#567 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABE23FAZFBJBHPZ2RSCXMDZUNRBBAVCNFSM6AAAAABNHCSSTCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANJRGQYTEOA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I apologize if this is old hat and I didn't find the relevant thread.
LSS: I've used staticjinja for a few years and have various content rendering with it and a fair bit archived that can be rendered with it as well.
https://github.com/staticjinja/staticjinja
I'd like to move all of my staticjinja code and templates to a rust platform as I've leaned toward rust tooling given its emergent influence in python.
Is minijinja a good target for such a move and if so, what's the best path to take to get there?
I'm willing to abandon various pieces/parts, as some were at best, barely viable.
I'm also willing to contribute code, doc, or whatever might be required to connect the dots in minijinja.
My rust foo is nil but I'm motivated to learn more given rust is clearly the future of python tooling, if not the future of computing. 👍
My jinja templates are based on pico.css and are quite minimal, so if the static mode of execution is possible, then I'm hopeful that the path from staticjinja to minijinja may be straightforward.
My templates, starting with the base template::
https://github.com/davidthewatson/davidthewatson.github.io/blob/master/src/_base.html
That includes the partials:
https://github.com/davidthewatson/davidthewatson.github.io/tree/master/src/partials
The static jinja code that builds all the content from these jinja templates:
https://github.com/davidthewatson/cms/blob/main/src/md2html.py
Thoughts?
Thanks for any pointers or insight you can provide.
I realize it's a monstrosity that I hope minijinja may help me simplify by deprecating most of it!
I'm open-minded about alternatives, though I've tried other approaches which produce more complexity and latency as opposed to less. 😞
Beta Was this translation helpful? Give feedback.
All reactions