Skip to content

Commit afdaf76

Browse files
authored
Fix documentation markup, add ref to sphinx-themes.org (#15)
1 parent 37920f2 commit afdaf76

13 files changed

Lines changed: 111 additions & 108 deletions

File tree

docs/source/index.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ This documentation explains how to make use of the Nefertiti theme with Sphinx p
1818
Features
1919
========
2020

21-
* Responsive design, based on `Bootstrap 5.3 <https://getbootstrap.com/docs/5.3>`_.
22-
* Text input field to filter the table of contents.
23-
* Font configuration compliant with `EU's GDPR <https://gdpr.eu/>`_.
24-
* Different fonts can be used for different elements.
25-
* Light and dark color schemes, for normal text and code highlighted with Pygments styles.
26-
* Diverse color sets are available: blue, indigo, purple, pink, red, orange, yellow, ...
27-
* Optional highlighting of the project repository in the header.
28-
* Optional project version selector in the header.
29-
* Customizable footer links.
21+
* Responsive design, based on `Bootstrap 5.3 <https://getbootstrap.com/docs/5.3>`_.
22+
* Text input field to filter the table of contents.
23+
* Font configuration compliant with `EU's GDPR <https://gdpr.eu/>`_.
24+
* Different fonts can be used for different elements.
25+
* Light and dark color schemes, for normal text and code highlighted with Pygments styles.
26+
* Diverse color sets are available: blue, indigo, purple, pink, red, orange, yellow, ...
27+
* Optional highlighting of the project repository in the header.
28+
* Optional project version selector in the header.
29+
* Customizable footer links.
3030

3131
Project background
3232
==================

docs/source/quick-start.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ Customize the theme
4343

4444
The following features of Nefertiti for Sphinx can be customized:
4545

46-
1. Fonts.
47-
2. Color set: blue, indigo, purple, pink, red, ...
48-
3. Pygments styles for light and dark color schemes.
49-
4. Repository name and URL to display it in the header.
50-
5. Project version dropdown selector.
51-
6. Footer links.
46+
1. Fonts.
47+
2. Color set: blue, indigo, purple, pink, red, ...
48+
3. Pygments styles for light and dark color schemes.
49+
4. Repository name and URL to display it in the header.
50+
5. Project version dropdown selector.
51+
6. Footer links.
5252

5353

5454
1. Fonts
@@ -58,16 +58,16 @@ There are 5 options related to font face customization and 2 options related to
5858

5959
The font face options are:
6060

61-
* ``sans_serif_font``: Default site font, defaults to `Nunito <https://www.fontsquirrel.com/fonts/nunito?q%5Bterm%5D=Nunito&q%5Bsearch_check%5D=Y>`_.
62-
* ``monospace_font``: Default monospace font, for code blocks, defaults to `Red Hat Mono <https://www.fontsquirrel.com/fonts/ubuntu-mono?q%5Bterm%5D=Ubuntu+Mono&q%5Bsearch_check%5D=Y>`_.
63-
* ``project_name_font``: The font for the Project's name. ``sans_serif_font`` otherwise.
64-
* ``documentation_font``: reStructuredText and Markdown content. ``sans_serif_font`` otherwise.
65-
* ``doc_headers_font``: To render documentation headers. ``documentation_font`` otherwise.
61+
* ``sans_serif_font``: Default site font, defaults to `Nunito <https://www.fontsquirrel.com/fonts/nunito?q%5Bterm%5D=Nunito&q%5Bsearch_check%5D=Y>`_.
62+
* ``monospace_font``: Default monospace font, for code blocks, defaults to `Red Hat Mono <https://www.fontsquirrel.com/fonts/ubuntu-mono?q%5Bterm%5D=Ubuntu+Mono&q%5Bsearch_check%5D=Y>`_.
63+
* ``project_name_font``: The font for the Project's name. ``sans_serif_font`` otherwise.
64+
* ``documentation_font``: reStructuredText and Markdown content. ``sans_serif_font`` otherwise.
65+
* ``doc_headers_font``: To render documentation headers. ``documentation_font`` otherwise.
6666

6767
And the font size options:
6868

69-
* ``monospace_font_size``: The CSS ``font-size`` for the ``monospace_font``. ie: ``"1rem"``.
70-
* ``documentation_font_size``: The CSS ``font-size`` for the ``documentation_font``. ie: ``"1.1rem"``.
69+
* ``monospace_font_size``: The CSS ``font-size`` for the ``monospace_font``. ie: ``"1rem"``.
70+
* ``documentation_font_size``: The CSS ``font-size`` for the ``documentation_font``. ie: ``"1.1rem"``.
7171

7272
Edit your ``conf.py`` file and add or modify your ``html_theme_options`` setting with the following content. By the way, the fonts referred to in this example are part of the Nefertiti for Sphinx distribution. If you want to use other Open Source licensed fonts read the section "How to add more fonts" to include them with your project.
7373

@@ -104,8 +104,8 @@ When ``style`` is not given the theme defaults to ``cyan``.
104104

105105
Pygments_ is the package in charge of rendering code blocks. Sphinx supports two settings related with pygments:
106106

107-
* ``pygments_style``, applied when browser's ``prefers-color-scheme`` returns **light**.
108-
* ``pygments_dark_style``, applied when browser's ``prefers-color-scheme`` returns **dark**.
107+
* ``pygments_style``, applied when browser's ``prefers-color-scheme`` returns **light**.
108+
* ``pygments_dark_style``, applied when browser's ``prefers-color-scheme`` returns **dark**.
109109

110110
Nefertiti for Sphinx extends the use of these settings in a way that their styling is applied when the user selects the scheme in the light/dark dropdown, at the right side of the header.
111111

docs/source/users-guide/components/admonitions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Admonitions
66

77
A Sphinx admonition consist of three elements:
88

9-
* the type of the admonition,
10-
* An optional title, and
11-
* the body, which is normally text.
9+
* the type of the admonition,
10+
* An optional title, and
11+
* the body, which is normally text.
1212

1313
Sphinx supports the following types of admonitions: **attention**, **caution**, **danger**, **error**, **hint**, **important**, **note**, **tip**, **warning**.
1414

docs/source/users-guide/components/footnotes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Footnotes are a way to include additional information to a word or sentence with
77

88
This section shows how footnotes are displayed with Nefertiti for Sphinx. To know more about the syntax to include footnotes, checkout the docs:
99

10-
* When using `Markdown <https://myst-parser.readthedocs.io/en/latest/syntax/typography.html#footnotes>`_.
11-
* When using `reStructuredText <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#footnotes>`_.
10+
* When using `Markdown <https://myst-parser.readthedocs.io/en/latest/syntax/typography.html#footnotes>`_.
11+
* When using `reStructuredText <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#footnotes>`_.
1212

1313
Example footnote 1
1414
******************

docs/source/users-guide/components/index.rst

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ Components
55

66
The following pages contain examples of visual elements that can be included in Sphinx docs. The goals of this section are:
77

8-
* To show how these elements look like when using Nefertiti for Sphinx,
9-
* to help with the development of the theme itself, and
10-
* to serve as a reminder of how to include these elements in reStructuredText and Markdown documents.
8+
* To show how these elements look like when using Nefertiti for Sphinx,
9+
* to help with the development of the theme itself, and
10+
* to serve as a reminder of how to include these elements in reStructuredText and Markdown documents.
1111

12-
.. toctree::
13-
:maxdepth: 1
12+
.. toctree::
13+
:maxdepth: 1
1414

15-
admonitions
16-
code-blocks
17-
headings
18-
images
19-
figures
20-
lists
21-
tables
22-
math
23-
footnotes
15+
admonitions
16+
code-blocks
17+
headings
18+
images
19+
figures
20+
lists
21+
tables
22+
math
23+
footnotes
24+
25+
26+
The sphinx-themes.org project collects and tests many Sphinx themes with an extensive set of markup elements. Visit the section dedicated to `Nefertiti for Sphinx <https://sphinx-themes.org/sample-sites/sphinx-nefertiti/>`_ to see how the theme renders the testing documentation of sphinx-themes.org.

docs/source/users-guide/contributing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ How to contribute
88

99
There are different ways to contribute:
1010

11-
* If something is not working, or
12-
* if there is wrong or missing information in the documentation, or
13-
* if you would like to suggest an idea or improvement,
11+
* If something is not working, or
12+
* if there is wrong or missing information in the documentation, or
13+
* if you would like to suggest an idea or improvement,
1414

1515
please, create an entry in the `issues page <https://github.com/danirus/sphinx-nefertiti/issues>`_ of Nefertiti's repository and explain the details.
1616

docs/source/users-guide/customization/color-sets.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ To apply custom style changes on top of Nefertiti you can create your own styles
107107

108108
For example, if you wanted to use the color set **green** but using different colors in the header you would do the following:
109109

110-
#. Create a new stylesheet, say a new ``custom.css`` file, inside your source ``_static`` directory with the style changes you want to apply to the header, and
111-
#. Update your ``conf.py`` file to change two entries:
110+
#. Create a new stylesheet, say a new ``custom.css`` file, inside your source ``_static`` directory with the style changes you want to apply to the header, and
111+
#. Update your ``conf.py`` file to change two entries:
112112

113-
* Set your ``html_style`` to ``["custom.css"]`` at module scope, to tell Sphinx to load the new stylesheet when building the site.
114-
* Set ``"style"`` to ``"green"`` inside ``html_theme_options``.
113+
+ Set your ``html_style`` to ``["custom.css"]`` at module scope, to tell Sphinx to load the new stylesheet when building the site.
114+
+ Set ``"style"`` to ``"green"`` inside ``html_theme_options``.
115115

116116
The next two sections implement the changes.
117117

@@ -181,11 +181,11 @@ A color set is basically a complete new theme created out of the content given i
181181

182182
To develop a new color set we need to go through the following steps:
183183

184-
#. Create ``.scss`` files.
185-
#. Build the color set.
186-
#. Test the color set.
187-
#. Add the color set to the Sphinx theme.
188-
#. Use the color set.
184+
#. Create ``.scss`` files.
185+
#. Build the color set.
186+
#. Test the color set.
187+
#. Add the color set to the Sphinx theme.
188+
#. Use the color set.
189189

190190
As an example the following sections show how to create a new color set called **django** that tries to resemble the colors used in the Django_ website.
191191

@@ -277,8 +277,8 @@ If you had any other changes to apply specifically to the new ``django`` color s
277277

278278
The ``package.json`` files offers two scripts to build style files:
279279

280-
* ``css-compile``: to compile all the SASS files within the ``scss/`` directory.
281-
* ``watch-css``: to call ``css-compile`` when there are changes in the ``scss/`` directory.
280+
* ``css-compile``: to compile all the SASS files within the ``scss/`` directory.
281+
* ``watch-css``: to call ``css-compile`` when there are changes in the ``scss/`` directory.
282282

283283
.. code-block:: shell
284284

docs/source/users-guide/customization/fonts.rst

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ Font settings
1919

2020
There are 5 font face customization settings that can be added to ``html_theme_options``, in your ``conf.py``:
2121

22-
* **sans_serif_font**: It is the default global site font used for everything except code blocks and inline code samples. It defaults to `Nunito`_.
23-
* **monospace_font**: It is the default monospace font used for code blocks and inline code samples. It defaults to `Red Hat Mono`_.
24-
* **project_name_font**: It is the font used to render the project's name in the header and the footer. When not given it default to the **sans_serif_font** option.
25-
* **documentation_font**: It is the font used to render the actual documentation contained in reStructuredText or Markdown files. It defaults to the **sans_serif_font**.
26-
* **doc_headers_font**: It is the font used to render documentation headers. When not given it defaults to the **Georgia** web safe font.
22+
* **sans_serif_font**: It is the default global site font used for everything except code blocks and inline code samples. It defaults to `Nunito`_.
23+
* **monospace_font**: It is the default monospace font used for code blocks and inline code samples. It defaults to `Red Hat Mono`_.
24+
* **project_name_font**: It is the font used to render the project's name in the header and the footer. When not given it default to the **sans_serif_font** option.
25+
* **documentation_font**: It is the font used to render the actual documentation contained in reStructuredText or Markdown files. It defaults to the **sans_serif_font**.
26+
* **doc_headers_font**: It is the font used to render documentation headers. When not given it defaults to the **Georgia** web safe font.
2727

2828
Additionally there are two font size settings:
2929

30-
* **documentation_font_size**: Specifies the default font size for the documentation contained in reStructuredText or Markdown files. It defaults to ``1.0rem``, which corresponds to ``16px``.
31-
* **monospace_font_size**: Specifies the default font size to use with code blocks and inline code samples. It defaults to ``1.0rem``, corresponding to ``16px``.
30+
* **documentation_font_size**: Specifies the default font size for the documentation contained in reStructuredText or Markdown files. It defaults to ``1.0rem``, which corresponds to ``16px``.
31+
* **monospace_font_size**: Specifies the default font size to use with code blocks and inline code samples. It defaults to ``1.0rem``, corresponding to ``16px``.
3232

3333
You can ignore these settings and let Nefertiti for Sphinx use the default font settings, or you can customize them.
3434

@@ -37,20 +37,20 @@ Fonts bundled with Nefertiti
3737

3838
Nefertiti for Sphinx is bundled with a group of fonts with licenses open for free distribution:
3939

40-
* Assistant_
41-
* Exo_
42-
* Montserrat_
43-
* Mulish_
44-
* Nunito_
45-
* `Open Sans`_
46-
* `Red Hat Display`_
47-
* `Sofia Sans`_
48-
* Ubuntu_
49-
* Varta_
50-
* `Work Sans`_
51-
* `Fira Code`_ (monospace)
52-
* `Red Hat Mono`_ (monospace)
53-
* `Ubuntu Mono`_ (monospace)
40+
* Assistant_
41+
* Exo_
42+
* Montserrat_
43+
* Mulish_
44+
* Nunito_
45+
* `Open Sans`_
46+
* `Red Hat Display`_
47+
* `Sofia Sans`_
48+
* Ubuntu_
49+
* Varta_
50+
* `Work Sans`_
51+
* `Fira Code`_ (monospace)
52+
* `Red Hat Mono`_ (monospace)
53+
* `Ubuntu Mono`_ (monospace)
5454

5555
Web safe fonts
5656
**************
@@ -59,12 +59,12 @@ You can customize the font settings to use Web safe fonts. Unlike the previous f
5959

6060
Here is a list of font categories and their web safe fonts provided by all major web browsers:
6161

62-
* **Sans Serif**: Helvetica, Arial, Arial Black, Verdana, Tahoma, Trebuchet MS, Gill Sans
63-
* **Serif**: Times New Roman, Georgia, Palatino, Baskerville
64-
* **Monospace**: Andale Mono, Courier, Lucida, Monaco
65-
* **Calligraphy**: Bradley Hand
66-
* **Cursive**: Brush Script MT, Comic Sans MS
67-
* **Fantasy**: Impact, Luminari
62+
* **Sans Serif**: Helvetica, Arial, Arial Black, Verdana, Tahoma, Trebuchet MS, Gill Sans
63+
* **Serif**: Times New Roman, Georgia, Palatino, Baskerville
64+
* **Monospace**: Andale Mono, Courier, Lucida, Monaco
65+
* **Calligraphy**: Bradley Hand
66+
* **Cursive**: Brush Script MT, Comic Sans MS
67+
* **Fantasy**: Impact, Luminari
6868

6969
Example configuration
7070
*********************
@@ -92,11 +92,11 @@ Adding fonts
9292

9393
Using a font not distributed with Nefertiti for Sphinx requires to:
9494

95-
#. Create a directory to keep the font files.
96-
#. Get the font family files.
97-
#. Write the ``font-face`` declaration.
98-
#. Modify ``conf.py`` to make use of the font.
99-
#. Rebuild the project.
95+
#. Create a directory to keep the font files.
96+
#. Get the font family files.
97+
#. Write the ``font-face`` declaration.
98+
#. Modify ``conf.py`` to make use of the font.
99+
#. Rebuild the project.
100100

101101
The following 5 sections explain in detail the steps to make the font `Noto Sans`_ available to your Sphinx project using Nefertiti for Sphinx.
102102

@@ -118,8 +118,8 @@ In the source directory of your project, where you have your reStructuredText or
118118

119119
The Noto Sans font family has 18 font files of which Nefertiti will use only 2:
120120

121-
* ``NotoSans-Regular.ttf``
122-
* ``NotoSans-Bold.ttf``
121+
* ``NotoSans-Regular.ttf``
122+
* ``NotoSans-Bold.ttf``
123123

124124
Copy these two files inside the ``fonts/noto-sans`` directory.
125125

@@ -172,9 +172,9 @@ Once the previous steps have been completed the project can be built. The font f
172172
173173
Once the project has been built, take a look at the generated ``static`` directory, it can be in:
174174

175-
* ``build/html/_static``, or
176-
* ``_build/html/_static``, or
177-
* ``_build/html/static``, or similar.
175+
* ``build/html/_static``, or
176+
* ``_build/html/_static``, or
177+
* ``_build/html/static``, or similar.
178178

179179
An ``ls`` command should show the ``fonts`` directory containing the ``noto-sans`` directory and the files you created inside.
180180

docs/source/users-guide/customization/footer-links.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Footer links
55

66
The footer of HTML pages built with Nefertiti for Sphinx is divided in 4 areas or strings, from top to bottom:
77

8-
* The area for the Nefertiti footer links.
9-
* The name of the project, provided by Sphinx ``project`` setting.
10-
* The copyright notice, provided by Sphinx ``copyright`` setting.
11-
* The powered by notice.
8+
* The area for the Nefertiti footer links.
9+
* The name of the project, provided by Sphinx ``project`` setting.
10+
* The copyright notice, provided by Sphinx ``copyright`` setting.
11+
* The powered by notice.
1212

1313
The first and the last are theme specific and therefore they are represented by options within the ``html_theme_options`` setting.
1414

@@ -17,8 +17,8 @@ Theme options
1717

1818
The following two options can be customized in the ``html_theme_options``, in your project's ``conf.py`` file:
1919

20-
#. ``footer_links``: Represents a list of strings and links.
21-
#. ``show_powered_by``: A boolean value.
20+
#. ``footer_links``: Represents a list of strings and links.
21+
#. ``show_powered_by``: A boolean value.
2222

2323
1. ``footer_links``
2424
-------------------

docs/source/users-guide/customization/git-repository.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ Theme options
1010

1111
The two options to customize the Git repository are:
1212

13-
#. ``repository_url``
14-
#. ``repository_name``
13+
#. ``repository_url``
14+
#. ``repository_name``
1515

1616
1. ``repository_url``
1717
---------------------
1818

1919
Feed the ``repository_url`` with the HTTP URL of your repository. Using the ``git`` schema will not work:
2020

21-
* Example to GitHub: ``https://github.com/torvalds/linux``
22-
* Example to GitLab: ``https://gitlab.com/inkscape/inkscape``
23-
* Example to GLib at GNOME's GitLab: ``https://gitlab.gnome.org/GNOME/glib``
21+
* Example to GitHub: ``https://github.com/torvalds/linux``
22+
* Example to GitLab: ``https://gitlab.com/inkscape/inkscape``
23+
* Example to GLib at GNOME's GitLab: ``https://gitlab.gnome.org/GNOME/glib``
2424

2525
2. ``repository_name``
2626
----------------------

0 commit comments

Comments
 (0)