Issue #397 resolved

PATCH: Distinguishing outside and inside links

created an issue

Currently sphinx adds "reference external" and "reference internal" to distinguish between references external or internal to the current page. While perhaps this is useful, a more helpful distinction is between links outside or inside the current website.

This is especially true given that once the user leaves the current sphinx hierarchy by visiting an outside page, the only way to continue is the browser's back functionality. By giving the user a way to distinguish between outside and inside links, the user can opt to follow outside links in another window or tab instead.

The patch at adds this functionality by adding "link outside" or "link inside" classes to all references nodes that have a 'refuri' attribute.

Changes to default.css_t then render outside links with a dashed underline. Other additions to default.css_t make it easier to distinguish other types of hyperlinks.

Comments (3)

  1. Georg Brandl repo owner

    Thanks for the idea and initial implementation; I've decided to use "internal" and "external" for this purpose (the previous one doesn't make much sense for multi-file docutils projects); it's implemented in 494e38253787 . The special display of external links has to be activated by the "externalrefs" theme option.

  2. Log in to comment