Merge pull request #494 from jessetan/style-external-links-option

Add option to style external links
This commit is contained in:
Eric Holscher 2017-12-08 06:47:45 -08:00 committed by GitHub
commit b40d5e8c50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 8 deletions

View File

@ -96,7 +96,8 @@ file of this repository, and can be defined in your project's ``conf.py`` via
'includehidden': True
'logo_only':
'display_version': True
'prev_next_buttons_location': bottom
'prev_next_buttons_location': bottom,
'style_external_links': False
}
The following options are available:
@ -107,6 +108,7 @@ The following options are available:
* ``includehidden`` Specifies if the global toctree includes toctrees marked with the `:hidden:` option
* ``prev_next_buttons_location`` can take the value ``bottom``, ``top``, ``both`` , or ``None``
and will display the "Next" and "Previous" buttons accordingly
* ``style_external_links`` Add an icon next to external links. Defaults to ``False``.
Page-level configuration
------------------------

View File

@ -33,13 +33,15 @@
// Usually it's a good idea to give images some space.
.section > img, .section > a > img
margin-bottom: $base-line-height
// Questionable whether this is nice or not. It styles eternal links, but comes with some baggage.
// a.reference.external:after
// font-family: FontAwesome
// content: " \f08e "
// color: $text-light
// vertical-align: super
// font-size: 60%
// Style external links
&.style-external-links a.reference.external:after
font-family: FontAwesome
content: "\f08e"
color: $text-light
vertical-align: super
font-size: 60%
margin: 0 0.2em
// For the most part, its safe to assume that sphinx wants you to use a blockquote as an indent. It gets
// used in many different ways, so don't assume you can apply some fancy style, just leave it be.

View File

@ -159,7 +159,11 @@
{# PAGE CONTENT #}
<div class="wy-nav-content">
{% if (theme_style_external_links == 'True') %}
<div class="rst-content style-external-links">
{% else %}
<div class="rst-content">
{% endif %}
{% include "breadcrumbs.html" %}
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

View File

@ -14,3 +14,4 @@ includehidden = True
logo_only =
display_version = True
prev_next_buttons_location = bottom
style_external_links = False