fasthtml
fasthtml copied to clipboard
[FEATURE] Add path to jupy HTMX
Is your feature request related to a problem? Please describe.
the HTMX function to run app in a notebook does not allow for passing a path (though Hamel has a clever hack of passing port=8000/route
). To make this cleaner, we should add a path that you can pass to HTMX to load a particular route in the iframe.
Describe the solution you'd like
HTMX()
-> Loads /
route in iframe
HTMX(
myroute) -> loads
/myroute` in iframe
Example code Provide an example of how you imagine the feature working:
HTMX('myroute')
Problem solved It would make using fastHTML apps in jupyter notebooks cleaner.
Additional context
Confirmation Please confirm the following:
- [x] I have checked the existing issues and pull requests to ensure this feature hasn't been requested before.
- [x] I have read the project's documentation to ensure this feature doesn't already exist.