Skip to content

Commit 7fcc9bb

Browse files
committed
Reoganize customization page a bunch.
Includes alphabetizing all the lists. Includes a handful of editorial additions, like making it clear that show_related and show_relbar control different page elements (sigh)
1 parent a5496b2 commit 7fcc9bb

File tree

2 files changed

+123
-84
lines changed

2 files changed

+123
-84
lines changed

docs/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Changelog
55
- :bug:`-` On some browsers/platforms, 'badge'-style sidebar elements were
66
displaying dotted underlines. This was unintentional and explicit styling has
77
been added to remove them. Credit to Steven Loria.
8+
- :support:`- backported` Reorganize the :doc:`customization page
9+
</customization>` to break up the now rather long list of "variables and
10+
feature toggles" into additional sections; includes alphabetizing those
11+
lists, to make it a bit easier to find docs for a specific setting.
812
- :bug:`128` Remove Gittip/Gratipay output from the ``donation.html`` sidebar
913
component, since the actual service has been insolvent since 2017. The
1014
configuration options remain in place for the time being (to avoid breaking

docs/customization.rst

Lines changed: 119 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Alabaster's behavior & style can be customized in multiple ways:
1313
.. note::
1414
Some theme options implemented prior to 0.7.8 would have been more suitable
1515
as local custom stylesheet overrides. Therefore:
16-
16+
1717
* We no longer accept feature requests which are more appropriately solved
1818
by using this functionality instead.
1919
* In future backwards-incompatible versions we may deprecate some of those
2020
options; as such we highly recommend leveraging the custom stylesheet
2121
whenever possible, even if an option is present below.
22-
22+
2323
* When in doubt, simply check `the built-in stylesheet's template
2424
<https://github.com/bitprophet/alabaster/blob/master/alabaster/static/alabaster.css_t>`_
2525
to see whether the option you're looking at is a basic variable
@@ -64,9 +64,25 @@ behavior. Default values can be found by viewing `theme.conf
6464
<https://github.com/bitprophet/alabaster/blob/master/alabaster/theme.conf>`_
6565
directly.
6666

67-
Variables and feature toggles
68-
-----------------------------
67+
Basics
68+
------
69+
70+
Settings related to text display, logo, etc.
71+
72+
* ``body_text_align``: Which CSS ``text-align`` value to use for body text
73+
(if there is any.)
74+
* ``canonical_url``: If set, is used as the base URL (set before the relative
75+
path/pagename) for a ``<link rel="canonical">`` `canonical URL
76+
<https://support.google.com/webmasters/answer/139066?rd=1>`_ header tag.
77+
78+
.. note:: This value must end with a trailing slash.
6979

80+
* ``description``: Text blurb about your project, to appear under the logo.
81+
* ``description_font_style``: Which CSS ``font-style`` to use for description
82+
text.
83+
* ``fixed_sidebar``: Makes the sidebar 'fixed' or pinned in place, so that the
84+
main body of the page scrolls but the sidebar remains visible. (Applies only
85+
to desktop window sizes; the mobile view is unaffected.)
7086
* ``logo``: Relative path (from ``$PROJECT/_static/``) to a logo image, which
7187
will appear in the upper left corner above the name of the project.
7288

@@ -79,89 +95,108 @@ Variables and feature toggles
7995
project name itself.
8096
* ``logo_text_align``: Which CSS ``text-align`` value to use for logo text
8197
(if there is any.)
82-
* ``body_text_align``: Which CSS ``text-align`` value to use for body text
83-
(if there is any.)
84-
* ``description``: Text blurb about your project, to appear under the logo.
85-
* ``description_font_style``: Which CSS ``font-style`` to use for description
86-
text.
87-
* ``github_user``, ``github_repo``: Used by ``github_button`` and
88-
``github_banner`` (see below); does nothing if both of those are set to
89-
``false``.
90-
* ``github_button``: ``true`` or ``false`` - whether to link to your Github.
98+
* ``page_width``: CSS width specifier controlling default content/page width.
99+
* ``sidebar_width``: CSS width specifier controlling default sidebar width.
100+
* ``touch_icon``: Path to an image (as with ``logo``, relative to
101+
``$PROJECT/_static/``) to be used for an iOS application icon, for when
102+
pages are saved to an iOS device's home screen via Safari.
91103

92-
* If ``true``, requires that you set ``github_user`` and ``github_repo``.
93-
* There are also the ``github_type`` and ``github_count`` options, which
94-
behave as described in `Github Buttons' documentation
95-
<https://ghbtns.com>`_:
104+
Service links and badges
105+
------------------------
106+
107+
Third-party services (GitHub, Travis-CI, etc etc) and related badges or
108+
banners.
96109

110+
* ``analytics_id``: Set to your `Google Analytics
111+
<http://www.google.com/analytics/>`_ ID (e.g. ``UA-#######-##``) to enable
112+
tracking.
113+
* ``badge_branch``: Set which branch is used in the Travis, CodeCov, etc
114+
badges.
115+
* ``codecov_button``: ``true``, ``false`` or a Github-style ``"account/repo"``
116+
string - used to display a `Codecov <https://codecov.io>`_ build status
117+
button in the sidebar. If ``true``, uses your ``github_(user|repo)``
118+
settings.
97119
* ``github_banner``: ``true`` or ``false`` - whether to apply a 'Fork me on
98120
Github' banner in the top right corner of the page.
99121

100-
* If ``true``, requires that you set ``github_user`` and ``github_repo``.
122+
* If ``true``, requires that you set ``github_user`` and ``github_repo``
123+
(see below).
101124
* May also submit a string file path (as with ``logo``, relative to
102125
``$PROJECT/_static/``) to be used as the banner image instead of the
103126
default.
104127

105-
* ``badge_branch``: Set which branch is used in Travis, CodeCov, etc badges.
106-
* ``travis_button``: ``true``, ``false`` or a Github-style ``"account/repo"``
107-
string - used to display a `Travis-CI <https://travis-ci.org>`_ build status
108-
button in the sidebar. If ``true``, uses your ``github_(user|repo)``
109-
settings.
128+
* ``github_button``: ``true`` or ``false`` - whether to link to your Github.
129+
130+
* If ``true``, requires that you set ``github_user`` and ``github_repo``.
131+
* There are also the ``github_type`` and ``github_count`` options, which
132+
behave as described in `Github Buttons' documentation
133+
<https://ghbtns.com>`_:
134+
* ``github_repo``: Used by ``github_button`` and ``github_banner`` (see above);
135+
does nothing if both of those are set to ``false``.
136+
* ``github_user``: Used by ``github_button`` and ``github_banner`` (see above);
137+
does nothing if both of those are set to ``false``.
138+
* ``gittip_user`` / ``gratipay_user``: **Deprecated**, as that service is no
139+
longer running. These options still exist (removing them would break
140+
backwards compatibility; Sphinx errors when users try to set nonexistent
141+
options) but they no longer do anything.
110142
* ``tidelift_url``: Set this to your `Tidelift <https://tidelift.com/>`_
111143
project URL if you want a "Professional support" section in your sidebar.
112144

113145
- Requires ``donation.html`` to be enabled in your ``html_sidebars`` option.
114146
- If copying the URL straight from Tidelift's site, you'll probably want to
115147
change ``&utm_campaign=readme`` to ``&utm_campaign=docs``.
116148

117-
* ``codecov_button``: ``true``, ``false`` or a Github-style ``"account/repo"``
118-
string - used to display a `Codecov <https://codecov.io>`_ build status
149+
* ``travis_button``: ``true``, ``false`` or a Github-style ``"account/repo"``
150+
string - used to display a `Travis-CI <https://travis-ci.org>`_ build status
119151
button in the sidebar. If ``true``, uses your ``github_(user|repo)``
120152
settings.
121-
* ``gittip_user`` / ``gratipay_user``: **Deprecated**, as that service is no
122-
longer running. These options still exist (removing them would break
123-
backwards compatibility; Sphinx errors when users try to set nonexistent
124-
options) but they no longer do anything.
125-
* ``analytics_id``: Set to your `Google Analytics
126-
<http://www.google.com/analytics/>`_ ID (e.g. ``UA-#######-##``) to enable
127-
tracking.
128-
* ``touch_icon``: Path to an image (as with ``logo``, relative to
129-
``$PROJECT/_static/``) to be used for an iOS application icon, for when
130-
pages are saved to an iOS device's home screen via Safari.
131-
* ``canonical_url``: If set, is used as the base URL (set before the relative
132-
path/pagename) for a ``<link rel="canonical">`` `canonical URL
133-
<https://support.google.com/webmasters/answer/139066?rd=1>`_ header tag.
134153

135-
.. note:: This value must end with a trailing slash.
154+
Non-service sidebar control
155+
---------------------------
156+
157+
Sidebar-related options that aren't directly related to service links.
136158

137159
* ``extra_nav_links``: Dictionary mapping link names to link targets; these
138160
will be added in a UL below the main sidebar navigation (provided you've
139161
enabled ``navigation.html`` via the ``html_sidebars`` option; see
140162
:doc:`installation`.) Useful for static links outside your Sphinx doctree.
163+
* ``show_related``: Boolean controlling whether the sidebar
164+
'next/previous/related' secondary navigation elements are hidden or
165+
displayed. Defaults to ``false`` since on many sites these elements are
166+
superfluous.
167+
168+
.. note::
169+
This is distinct from the ``show_relbars`` setting found in the
170+
header/footer options; the two visual components are orthogonal and may be
171+
enabled/disabled independently of one another.
172+
173+
* ``sidebar_collapse``: Boolean determining whether all TOC entries that
174+
are not ancestors of the current page are collapsed.
175+
You can read more about this in the Sphinx toctree
176+
`docs <http://www.sphinx-doc.org/en/stable/templating.html#toctree>`_.
141177
* ``sidebar_includehidden``: Boolean determining whether the TOC sidebar
142178
should include hidden Sphinx toctree elements. Defaults to ``true`` so you
143179
can use ``:hidden:`` in your index page's root toctree & avoid having 2x
144180
copies of your navigation on your landing page.
145-
* ``sidebar_collapse``: Boolean determining whether all TOC entries that
146-
are not ancestors of the current page are collapsed.
147-
You can read more about this in the Sphinx toctree
148-
`docs <http://www.sphinx-doc.org/en/stable/templating.html#toctree>`_.
181+
182+
Header/footer options
183+
---------------------
184+
185+
Which elements should appear in the header and/or footer, or modification of
186+
same.
187+
149188
* ``show_powered_by``: Boolean controlling display of the ``Powered by
150189
Sphinx N.N.N. & Alabaster M.M.M`` section of the footer. When ``true``, is
151190
displayed next to the copyright information; when ``false``, is hidden.
152-
* ``show_related``: Boolean controlling whether the 'next/previous/related'
153-
secondary navigation elements are hidden or displayed. Defaults to ``false``
154-
since on many sites these elements are superfluous.
155-
* ``page_width``: CSS width specifier controlling default content/page width.
156-
* ``sidebar_width``: CSS width specifier controlling default sidebar width.
157-
* ``fixed_sidebar``: Makes the sidebar 'fixed' or pinned in place, so that the
158-
main body of the page scrolls but the sidebar remains visible. (Applies only
159-
to desktop window sizes; the mobile view is unaffected.)
160191
* ``show_relbars``: ``true`` or ``false`` - used to display *next* and
161192
*previous* links above and below the main page content. If you only want to
162193
display one, this setting can be further overridden through the
163194
``show_relbar_top`` and ``show_relbar_bottom`` settings.
164195

196+
.. note::
197+
This is distinct from the ``show_related`` setting found in the sidebar
198+
control options, which controls sidebar-only next/previous links.
199+
165200
Style colors
166201
------------
167202

@@ -170,58 +205,58 @@ These should be fully qualified CSS color specifiers such as ``#004B6B`` or
170205
for many of the others; update these to make sweeping changes to the
171206
colorscheme. The more granular settings can be used to override as needed.
172207

208+
* ``anchor``: Foreground color of section anchor links (the 'paragraph'
209+
symbol that shows up when you mouseover page section headers.)
210+
* ``anchor_hover_bg``: Background color of ``anchor`` text.
211+
* ``anchor_hover_fg``: Foreground color of section anchor links (as above)
212+
when moused over.
213+
* ``body_text``: Main content text.
214+
* ``code_highlight``: Color of highlight when using ``:emphasize-lines:`` in a code block.
215+
* ``footer_text``: Footer text (includes links.)
216+
* ``footnote_bg``: Background of footnote blocks.
217+
* ``footnote_border``: Border of same.
173218
* ``gray_1``: Dark gray.
174219
* ``gray_2``: Light gray.
175220
* ``gray_3``: Medium gray.
221+
* ``link_hover``: Body links, hovered.
222+
* ``link``: Non-hovered body links.
223+
* ``narrow_sidebar_bg``: Background of 'sidebar' when narrow window forces
224+
it to the bottom of the page.
225+
* ``narrow_sidebar_fg``: Text color of same.
226+
* ``narrow_sidebar_link``: Link color of same.
227+
* ``note_bg``: Background of ``.. note::`` blocks.
228+
* ``note_border``: Border of same.
176229
* ``pink_1``: Light pink.
177230
* ``pink_2``: Medium pink.
178-
* ``body_text``: Main content text.
179-
* ``footer_text``: Footer text (includes links.)
180-
* ``link``: Non-hovered body links.
181-
* ``link_hover``: Body links, hovered.
231+
* ``pre_bg``: Background of preformatted text blocks (including code
232+
snippets.)
233+
* ``relbar_border``: Color of border between bar holding *next* and *previous*
234+
links, and the rest of the page content.
235+
* ``seealso_bg``: Background of ``.. seealso::`` blocks.
236+
* ``seealso_border``: Border of same.
182237
* ``sidebar_header``: Sidebar headers.
183-
* ``sidebar_text``: Sidebar paragraph text.
238+
* ``sidebar_hr``: Color of sidebar horizontal rule dividers.
184239
* ``sidebar_link``: Sidebar links (there is no hover variant.) Applies to
185240
both header & text links.
241+
* ``sidebar_list``: Foreground color of sidebar list bullets & unlinked text.
186242
* ``sidebar_link_underscore``: Sidebar links' underline (technically a
187243
bottom-border).
188244
* ``sidebar_search_button``: Background color of the search field's 'Go'
189245
button.
190-
* ``sidebar_list``: Foreground color of sidebar list bullets & unlinked text.
191-
* ``sidebar_hr``: Color of sidebar horizontal rule dividers.
192-
* ``anchor``: Foreground color of section anchor links (the 'paragraph'
193-
symbol that shows up when you mouseover page section headers.)
194-
* ``anchor_hover_fg``: Foreground color of section anchor links (as above)
195-
when moused over.
196-
* ``anchor_hover_bg``: Background color of above.
197-
* ``note_bg``: Background of ``.. note::`` blocks.
198-
* ``note_border``: Border of same.
199-
* ``seealso_bg``: Background of ``.. seealso::`` blocks.
200-
* ``seealso_border``: Border of same.
246+
* ``sidebar_text``: Sidebar paragraph text.
201247
* ``warn_bg``: Background of ``.. warn::`` blocks.
202248
* ``warn_border``: Border of same.
203-
* ``footnote_bg``: Background of footnote blocks.
204-
* ``footnote_border``: Border of same.
205-
* ``pre_bg``: Background of preformatted text blocks (including code
206-
snippets.)
207-
* ``narrow_sidebar_bg``: Background of 'sidebar' when narrow window forces
208-
it to the bottom of the page.
209-
* ``narrow_sidebar_fg``: Text color of same.
210-
* ``narrow_sidebar_link``: Link color of same.
211-
* ``code_highlight``: Color of highlight when using ``:emphasize-lines:`` in a code block.
212-
* ``relbar_border``: Color of border between bar holding *next* and *previous*
213-
links, and the rest of the page content.
214249

215250
Fonts
216251
-----
217252

218-
* ``font_family``: Font family of body text.
219-
* ``font_size``: Font size of body text.
220-
* ``head_font_family``: Font family of headings. Defaults to ``'Garamond',
221-
'Georgia', serif``.
253+
* ``caption_font_size``: Font size of caption block text.
254+
* ``caption_font_family``: Font family of caption block text.
222255
* ``code_font_size``: Font size of code block text.
223256
* ``code_font_family``: Font family of code block text. Defaults to
224257
``'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
225258
monospace``.
226-
* ``caption_font_size``: Font size of caption block text.
227-
* ``caption_font_family``: Font family of caption block text.
259+
* ``font_family``: Font family of body text.
260+
* ``font_size``: Font size of body text.
261+
* ``head_font_family``: Font family of headings. Defaults to ``'Garamond',
262+
'Georgia', serif``.

0 commit comments

Comments
 (0)