@Félix I cannot see the suggestions by Edward about merging that 'all_root_children' into the commander's generators. Can you share?
Based on your example code, it seems if I move the options like @tool-tip into the leo node body, then it would be easy to create the pydantic model from leo. For page title and other meta data, I could put it into the node body in a node (probably first node). I'd need to walk the pydantic tree once to set the ID in the html elements so I could parse the node body to look for options. This approach would be slower and use more memory than your approach but would be easier to customize the html. Another disadvantage of this approach is mapping an error in the pydantic models to the spot in leo that caused the problem. I may need to add the leo model node id to the pydantic model. The html I posted automatically handles the indenting displayed in a brower. When I generate the html code, I ignore the indent in the html code. My thoughts are that in production, I'd want to minify the html and in development I could run through a prettifier to make the html nicely formatted. Here is html template for generating the html from a pydantic model: -------------- {# this is a version of a single node that has production formating #} {% if nodeInst%} <div class="accordion-item"> <!-- {{ nodeInst.headline }} --> <button class="btn btn-accordion bg-light text-dark" data-bs-toggle="collapse" data-bs-target="#id{{nodeInst.htmlId}}" aria-expanded="false" aria-controls="id{{nodeInst.htmlId}}" aria-describedby="idTooltip{{nodeInst.htmlId}}"> <span class="heading-text">{{ nodeInst.headline }}</span> <span class="toggle-arrow">▼</span> {#if have tool tip, add it #} {% if nodeInst.tooltip %} <span class="tooltip-html" id="idTooltip{{nodeInst.htmlId}}" role="tooltip">{{ nodeInst.tooltip }}</span> {% endif %} </button> <div id="id{{nodeInst.htmlId}}" class="collapse"> <div class="collapse-content"> <p>{{ nodeInst.body }}</p> {# loop child nodes if have #} {% if nodeInst.children %} {% for childInst in nodeInst.children %} {% include "site/node.html" with nodeInst=childInst %} {% endfor %} {% endif %} </div> </div> </div> <!-- /{{ nodeInst.headline }} --> {% else %} <h1 class="text-danger">Error: nodeInst not set in node.html</h1> {% endif %} ------------- I handle recursion and rest of the web page in other templates. Also, I have test templates like a node version that just prints out the variables in the node. On Tuesday, September 9, 2025 at 10:03:20 AM UTC-4 Félix wrote: > @Edward Thanks for merging that 'all_root_children' into the commander's > generators. As you can see from my preliminary examples two messages above, > It's the only 'custom' function I needed outside the recursive one. (That > will make it that much cleaner!) > > Stay tuned for more elaborate examples later this week! :) (Thanks > to @Brian for the inspiration!) > > A point I wanted to make is that it should be relatively easys to output > outline documents *without *rst, shpinx, markdown, docusaurus, etc, > etc... Those scripts are an attempt at that! :) > > Félix > > On Tue, Sep 9, 2025 at 7:19 AM Edward K. Ream <edre...@gmail.com> wrote: > >> >> >> On Mon, Sep 8, 2025 at 3:04 PM Thomas Passin <tbp1...@gmail.com> wrote: >> >>> Here's the bigger threat - >>> >>> >>> https://it.slashdot.org/story/25/09/08/1843235/hackers-hijack-npm-packages-with-2-billion-weekly-downloads-in-supply-chain-attack?utm_source=rss1.0mainlinkanon&utm_medium=feed >>> >>> >> Thanks for this, Thomas. I agree that compromising repos is a bigger >> problem. >> >> But I want to safeguard Leo's reputation above all else*.* >> >> *It's imperative that Leonistas don't open .leo files (or .html files >> representing Leo outlines) unless they trust the sender completely.* >> >> Edward >> >> -- >> You received this message because you are subscribed to the Google Groups >> "leo-editor" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to leo-editor+...@googlegroups.com. >> To view this discussion visit >> https://groups.google.com/d/msgid/leo-editor/CAMF8tS2od1pz8Ome2WCtRgn9JxdekQT827-3cVtrApLob3U9wA%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS2od1pz8Ome2WCtRgn9JxdekQT827-3cVtrApLob3U9wA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/leo-editor/c363c1be-b98a-42e4-8da5-a86bef0348b0n%40googlegroups.com.