-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding links HTML <->Slides (manually) #104
Comments
I suspect the way to do it is with a custom Sphinx role. Roles allow you to apply custom processing to inline text (as opposed to directives -- like I sort of think something like
(or number) would be reasonable syntax. The wrinkle is going to be how to resolve the slide links if you want to allow links to arbitrary slides. Maybe all we need to do is the normal section linking, with a different URL base (ie, to Thoughts? |
Assuming both html and slides are build from the same sources (otherwise it useless), a build "knows" all refs (for normal -internal-- links). By fiddling the URL-base the other ref can be calculated. Here we can reuse current html<->slide links code/concept. I like the The big questions is what should the roles deliver when we are not building both slides and html? Creating dangling pointers is ugly. And the code itself can never 'know'. So we need a config/flag for that. But I guess we can (re)use Sounds like nice feature. The only downside is: I probably don't have time to implement it :-) |
You're right re: refs, although the slide builder generates new refs when you use things like the I sort of think it should be a different config flag: those two control whether or not we add the title-level slide <-> html links, this seems a little different. One option would be to read the environment in |
I prefer to have a explicit My proposal is to make two (boolean) flags This way, the configuration is small. It just works, as one expects when using the roles. It will be hard to create a dangling link, as the author has to use one of those new roles! The big question remains however: which text to use instead (when the flag of off). An example (Writing rst in md isn't fun; the code below works in preview; but not in real. Guess you can guess ...)
When off (and using title syntax) the text simply ends with slides. (no link). That will work for me. |
It would be very nice to be able to insert a (or several) link(s) from the html-build to the slide-build; not to the "same" location (which can be done automatically), but to any place/ref I like.
Like it is possible from html to html (or slide to slide), using std RST notation.
UseCase: For trainings I will use hieroglyph slides and put them online, with html-handouts. They can be build from the same rst-source; or other files. However, html pages are typically very spares. That is logically for whoever expect a slide-show, but to other users, landing on the html-page, that can be strange.
Currently, I simply add warning (
ifnotsides:: warning:: ...read the slides...
). But I would love to haveslides
be an hyperlink to those slides.The question is how?
The text was updated successfully, but these errors were encountered: