-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:markdownRelated to Markdown renderingRelated to Markdown renderingtype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features
Description
Problem
It should be possible to make in-page links so that the app user can click on a title (e.g. within a Table of Contents) to reach the labeled part of the app quickly.
godot63 on the streamlit forum writes:
I would like to write something like:
[Station information](#Station-information)
where in the document there is a ‘# Station information’ title in the same doc. This seems to work on git but does not in my Streamlit app.
Links to look at:
Solution
MVP: The easiest thing is just to give every Markdown title and heading an automatic <a href="#title"> when it is rendered as HTML in React.
Possible enhancement: As an alternate or additional solution, it might be nice for users to have something like st.label("station-info") to create <a href="#station-info"> when the app is rendered. Then you could create in-page links without also needing to write a title or heading to the screen.
Additional context
pybokeh, romainmartinez and quassy
Metadata
Metadata
Assignees
Labels
feature:markdownRelated to Markdown renderingRelated to Markdown renderingtype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features