Change from sphinx_rtd_theme to alabaster theme not working

29 views
Skip to first unread message

Phillip Downen

unread,
Jul 5, 2023, 12:26:32 PMJul 5
to sphinx-users
I'm trying to change from sphinx_rtd_theme to the alabaster theme and the html output does not look right...I change the theme as follows in conf.py:

#html_theme = 'sphinx_rtd_theme'
html_theme = 'alabaster'

I'm using Sphinx 5.1.1
I've tried >make clean before the >make html

The output html has unformed tables, no side bar, unformatted text, and paragraph markers (e.g., )

My question: are there other settings I need to change to make the theme change?

Also, I don't have any layout.html file in \_templates.  Not sure if a layout.html is needed or not.

thanks for your help.

PD


Steevie

unread,
Jul 6, 2023, 5:03:32 AMJul 6
to sphinx...@googlegroups.com
Hi,

On Wed, 5 Jul 2023 09:26:32 -0700 (PDT), Phillip Downen wrote:

> I'm trying to change from sphinx_rtd_theme to the alabaster theme and
> the html output does not look right...I change the theme as follows in
> conf.py:
>
> #html_theme = 'sphinx_rtd_theme'
> html_theme = 'alabaster'
On every project I work, the change of theme (especially between alabaster
and rtd) does not impact significantly on the output, except, well, for the
layout :-) I never experienced errors like the few glitches that you
mention. If you posted the log of make clean html, perhaps it could give
you some more insights on what's failing. When switching theme, you should:

* change html_theme option (which you did)

* remove or change html_theme_options according to the new theme

* remember that any custom CSS and template you added will probably be
useless, as different themes use different templates and generate different
CSS classes.

* review all html_* options, because some of them may be unsupported
(although this has usually no influence on the build, these are usually
ignored)

> Also, I don't have any layout.html file in \_templates. Not sure if a
> layout.html is needed or not.
If you did no customisation, you don't need it.

HTH,
Stefano


Phillip Downen

unread,
Jul 6, 2023, 9:33:29 AMJul 6
to sphinx-users
Thank you, Stefano!  I'll try your suggestions and reply with results.

PD

Phillip Downen

unread,
Jul 6, 2023, 9:54:50 AMJul 6
to sphinx-users
Thanks, Stefan.

Your suggestions helped.  I needed to comment out the html_style directive pointing to a custom.css used for rtd. (no longer needed).

# html_style = 'css/custom.css'
# def setup(app):
#     app.add_css_file('css/button.css')


Thank you again for helping this novice!

Phil
Reply all
Reply to author
Forward
0 new messages