Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b45810b

Browse files
Jeremy AndersonJeremy Anderson
Jeremy Anderson
authored and
Jeremy Anderson
committed
Added line in custom_look to change the html theme to sphinxdoc so it looks like the screenshot. Updated the screenshot to what it will look like for users.
1 parent fdfb567 commit b45810b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

_static/fancy_screenshot.png

46.6 KB
Loading

custom_look.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ moves the vertical navigation panels to the right side of the page::
5353
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
5454
{% block sidebar2 %}{% endblock %}
5555

56+
Lastly, we need to modify the html theme in :file:`sampledoc/conf.py`::
57+
html_theme = 'sphinxdoc'
58+
5659
Once you rebuild the site with a ``make html`` and reload the page in your browser, you should see a fancier site that looks like this
5760

5861
.. image:: _static/fancy_screenshot.png

getting_started.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Fetching the data
4949
Now we will start to customize out docs. Grab a couple of files from
5050
the `web site <https://github.com/matplotlib/sampledoc>`_
5151
or git. You will need :file:`getting_started.rst` and
52-
:file:`_static/basic_screenshot.png`. All of the files live in the
52+
:file:`_static/new_basic_screenshot.png`. All of the files live in the
5353
"completed" version of this tutorial, but since this is a tutorial,
5454
we'll just grab them one at a time, so you can learn what needs to be
5555
changed where. Since we have more files to come, I'm going to grab
@@ -69,7 +69,7 @@ need into my :file:`sampledoc` directory::
6969
Unpacking objects: 100% (87/87), done.
7070
Checking connectivity... done
7171
home:~/tmp> cp tutorial/getting_started.rst sampledoc/
72-
home:~/tmp> cp tutorial/_static/basic_screenshot.png sampledoc/_static/
72+
home:~/tmp> cp tutorial/_static/new_basic_screenshot.png sampledoc/_static/
7373

7474
The last step is to modify :file:`index.rst` to include the
7575
:file:`getting_started.rst` file (be careful with the indentation, the
@@ -93,10 +93,11 @@ When you reload the page by refreshing your browser pointing to
9393
"Getting Started" docs, and in there this page with the screenshot.
9494
`Voila!`
9595

96-
Note we used the image directive to include to the screenshot above
96+
We can also use the image directive in :file:`index.rst` to include to the screenshot above
9797
with::
9898

99-
.. image:: _static/basic_screenshot.png
99+
.. image::
100+
_static/new_basic_screenshot.png
100101

101102

102103
Next we'll customize the look and feel of our site to give it a logo,

0 commit comments

Comments
 (0)