Skip to content

Commit 5e89f4a

Browse files
authored
Merge branch 'master' into beta-2
2 parents 42097c0 + b40d5e8 commit 5e89f4a

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ file of this repository, and can be defined in your project's ``conf.py`` via
9696
'includehidden': True
9797
'logo_only':
9898
'display_version': True
99-
'prev_next_buttons_location': bottom
99+
'prev_next_buttons_location': bottom,
100+
'style_external_links': False
100101
}
101102
102103
The following options are available:
@@ -107,6 +108,7 @@ The following options are available:
107108
* ``includehidden`` Specifies if the global toctree includes toctrees marked with the `:hidden:` option
108109
* ``prev_next_buttons_location`` can take the value ``bottom``, ``top``, ``both`` , or ``None``
109110
and will display the "Next" and "Previous" buttons accordingly
111+
* ``style_external_links`` Add an icon next to external links. Defaults to ``False``.
110112

111113
Page-level configuration
112114
------------------------

sass/_theme_rst.sass

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@
3333
// Usually it's a good idea to give images some space.
3434
.section > img, .section > a > img
3535
margin-bottom: $base-line-height
36-
// Questionable whether this is nice or not. It styles eternal links, but comes with some baggage.
37-
// a.reference.external:after
38-
// font-family: FontAwesome
39-
// content: " \f08e "
40-
// color: $text-light
41-
// vertical-align: super
42-
// font-size: 60%
36+
37+
// Style external links
38+
&.style-external-links a.reference.external:after
39+
font-family: FontAwesome
40+
content: "\f08e"
41+
color: $text-light
42+
vertical-align: super
43+
font-size: 60%
44+
margin: 0 0.2em
4345

4446
// For the most part, its safe to assume that sphinx wants you to use a blockquote as an indent. It gets
4547
// used in many different ways, so don't assume you can apply some fancy style, just leave it be.

sphinx_rtd_theme/layout.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@
159159

160160
{# PAGE CONTENT #}
161161
<div class="wy-nav-content">
162+
{% if (theme_style_external_links == 'True') %}
163+
<div class="rst-content style-external-links">
164+
{% else %}
162165
<div class="rst-content">
166+
{% endif %}
163167
{% include "breadcrumbs.html" %}
164168
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
165169
<div itemprop="articleBody">

sphinx_rtd_theme/theme.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ includehidden = True
1414
logo_only =
1515
display_version = True
1616
prev_next_buttons_location = bottom
17+
style_external_links = False

0 commit comments

Comments
 (0)