fasthtml icon indicating copy to clipboard operation
fasthtml copied to clipboard

[FEATURE] Add path to jupy HTMX

Open Isaac-Flath opened this issue 4 months ago • 0 comments

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 Screenshot 2024-10-08 at 7 18 01 PM

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.

Isaac-Flath avatar Oct 08 '24 23:10 Isaac-Flath