Example: how to use Snippet with Slots to make the best use of both HTML and Python #40
volfpeter
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Slot support arrived in version 0.5.0 for both the
SnippetandMDcomponents, but there was no proper example in the documentation on how to use this new feature. Finally, there is, in the form of a tinyFastAPIapp that uses a mix of plain HTML,Snippet,Slots, and "classic"htmycomponents to render a page. The example usesFastHXto automate rendering.Example: https://volfpeter.github.io/htmy/examples/snippet-slots-fastapi/
FastHXintegration example forhtmy: https://volfpeter.github.io/fasthx/examples/htmy/There's a lot more
SnippetandMDcan do with theirTextResolverandTextProcessorabstractions, and their text processing pipeline. Hopefully I'll have time to add more complex examples in the not too distant features. In the meantime, feel free to ask questions.Beta Was this translation helpful? Give feedback.
All reactions