From: Axial <holger.sp...@gmail.com>
Date: Wed, 31 Oct 2012 18:46:21 -0700 (PDT)
Local: Wed, Oct 31 2012 9:46 pm
Subject: How to add rel attribute to sphinx reference in HTML output?
I have a simple extension for Sphinx (my version in use is There seems to be a few ways to do this, but I couldn't find a simple one. The reference nodes are created in this fashion: node = nodes.reference(rawtext, utils.unescape(text), However, the *rel='bar'* attribute gets stripped out from the final HTML # overwrittendef visit_reference(self, node): <snip> if 'reftitle' in node: Additional attributes are not handled. Maybe they could be replaced in So, I could: - create a custom node which reimplements all the functionality of the I'm sure I'm missing the obvious and elegant solution. Thanks for reading. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||