Skip to content

Widget to host folder as website (for preview) #6195

@keiranmraine

Description

@keiranmraine

Problem

The current method of hosting html within a frame is limited to direct string incorporation (components.html()) or a pre existing external site (components.iframe()). It would be beneficial if it were possible to expose a folder to be hosted as a full site, for example to preview a site generated based on decisions in the app.

In my usecase I'd like to serve a mkdocs site before persisting to S3/Cloudfront.

Solution

MVP: What's the smallest possible solution that would get 80% of the problem out of the way?

Add a component.localserve(serve_root) function that exposes the folder as a website.

Possible additions: What are other things that could be added to the MVP over time to make it better?

Timeout to terminate serving of site after time elapsed (so only useful for preview)

Preferred solution: If you don't like the MVP above, tell us why, and what you'd like done instead.

NA

Additional context

Add any other context or screenshots about the feature request here. For example, did this FR come from https://discuss.streamlit.io or another site? Link the original source here!

Existing approach suitable for local dev and request for suitable solution for StreamlitCloud here:

https://discuss.streamlit.io/t/serve-a-prebuilt-mkdocs-site-in-iframe-on-streamlitcloud/37003


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

Views

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:utilitiesRelated to utility commandstype:enhancementRequests for feature enhancements or new featurestype:possible-componentCould be implemented as a custom component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions