diff --git a/docs/index.md b/docs/index.md index 650a5a5..d043746 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,8 @@ --- layout: default -title: python-lucide — Lucide icons as Python strings +title: Lucide icons as Python strings --- -# python-lucide - *[Mike Macpherson](https://github.com/mmacpherson)* **TL;DR:** All 1600+ [Lucide](https://lucide.dev) icons available as SVG strings @@ -12,7 +10,7 @@ in Python. `pip install python-lucide`, import, embed. No JavaScript, no icon fonts, no client-side rendering step. Every icon on this page is a real Lucide SVG, sourced from the package itself. -
+
@@ -37,9 +35,10 @@ SVG, sourced from the package itself. +
-## the itch +## the problem I like building HTML on the server. Not templates-with-holes, but actual programmatic markup — [hiccup](https://github.com/weavejester/hiccup) in @@ -49,7 +48,7 @@ ethos and makes it a full framework: pure Python components, web-standards-first no transpilation, no virtual DOM, no magic. The pattern extends to interactivity. -[Datastar](https://data-star.dev/), [HTMX](https://htmx.org/), and FastHTML's +[datastar.js](https://data-star.dev/), [HTMX](https://htmx.org/), and FastHTML's own HTMX integration all follow the same principle: the server renders HTML, the browser just shows it. No client-side JavaScript framework sitting between you and your markup. @@ -62,9 +61,10 @@ for a traditional SPA. In a server-rendered world, though, you have to call `lucide.createIcons()` again after every DOM swap — every HTMX response, every Datastar fragment, every partial update. It's a small thing, but it grates. -The fix is obvious: just embed the SVG directly. If the icon is already inline -in the HTML, there's nothing to initialize, nothing to re-run, nothing to -coordinate. The server sends the icon, the browser renders it, done. +If you're already building your markup on the server, SVG is just... more markup +to include. That's what python-lucide enables — it packages the Lucide icon set +into an easy-to-use Python library so that every icon is just a function call +away, no client-side initialization needed. ## the approach