Closed brianespinosa closed 1 year ago
Happy to take a look at throwing a PR up for this one as well if you think this would be in-scope for the Slideshow component.
Not sure about this one, I don't want to couple the component to the URL.
But maybe you can pass the starting slide index as a prop to the mdx, and then pass it to <CH.Slideshow start={props.slideIndex}/>
(that start
prop doesn't exist currently)
That makes sense. Would make it possible to achieve the same thing without bloating the API and introducing external dependencies or dependencies on the platform.
I could put something together along these lines instead later today.
:rocket: Issue was released in v0.7.3
:rocket:
It would be great to be able to opt in to letting CH.Slideshow set the current slide in the URL via query params and also initialize slide based on this query param. The use case I am thinking of here is if someone is using codehike for a talk, if they needed to refresh the page, or if they wanted to publish slides after a talk, links to a specific slide could be shared.
This should likely only be opt-in functionality as I know it is possible to have multiple Slideshow components on a page.