add role for custom hyperlinks #340
Labels
enhancement
New feature or request
feat: upstream
a feature that exists upstream but is not well supported in sphinx-immaterial
Currently, setting the
docutils.nodes.refernce
class'reftitle
attribute can only be used via docutils API. Some extensions already use this attribute to add tooltips for hyperlinks, namely intersphinx and a bunch of extensions exclusive to this theme.The rST specs do not allow doc authors to specify custom hyperlink tooltips. This is actually pretty standard in markdown:
renders as link text
It shouldn't be too hard to implement this as a sphinx extension. I'm imagining a
href
role that behaves similarly toref
role with this added behavior.proposed syntax
It would be nice to actually derive from the
ref
role and just add some extra content parsing where appropriate.PS - marking this as a comparable upstream feature because mkdocs-material release "improved toolips" support in v9.5.0
The text was updated successfully, but these errors were encountered: