ANN: New Sphinx theme: insipid

52 views
Skip to first unread message

Matthias Geier

unread,
Aug 21, 2020, 3:10:30 AM8/21/20
to sphinx...@googlegroups.com
Dear list.

I've recently created a new Sphinx HTML theme named "insipid". Its
documentation (and at the same time a usage example) can be found at:

https://insipid-sphinx-theme.readthedocs.io/

The usage should be really simple:

1. Install the Python package insipid-sphinx-theme
2. Add html_theme = 'insipid' to your conf.py
3. Run Sphinx!

It would be great if you could try it out and give feedback (either
here on the list or at
https://github.com/mgeier/insipid-sphinx-theme/issues)!

There are certainly many things that can (and should) be improved, I'd
love to hear your suggestions. Since the theme is very new, I think
I'm willing to accept quite drastic changes if necessary. Nothing is
set in stone, so please don't be shy with your suggestions!

There aren't a lot of example projects yet, I've just tried it out on
a few projects I'm currently working on:

https://nbsphinx.readthedocs.io/en/insipid-theme/
https://python-rtmixer.readthedocs.io/
https://mg.readthedocs.io/
https://jupyter-format.readthedocs.io/
https://audioscenedescriptionformat.readthedocs.io/

I've mostly tested the theme on multiple browsers on Linux and
Android, it would be great to get some coverage on Windows, macOS, iOS
and whatever other OS you are using!

cheers,
Matthias

Matt from Documatt

unread,
Aug 21, 2020, 3:46:26 AM8/21/20
to sphinx...@googlegroups.com
It looks very nice, Matthias. Thanks! Good work!

I personally consider creating themes as very important, because many projects want their documentation to look good, and the same as their main website.

Matt

--
You received this message because you are subscribed to the Google Groups "sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFesC-epgsSXzt18oF1kZX%3D-P7RD7Gm-bADWSEU7MPAYwympBA%40mail.gmail.com.

Luc Saffre

unread,
Aug 24, 2020, 10:46:33 PM8/24/20
to sphinx...@googlegroups.com, Matthias Geier
Great work! Thanks for sharing here.

I now switched to this theme for one of my private sites https://hw.saffre-rumma.net/

Luc

PS After installing it as instructed, I had the following traceback. But it went away after saying "pip install -U jinja2" (i.e. i had some older version of jinja, sphinx_rtd_theme had no problems with that, but insipid had)

Traceback (most recent call last):
  File "/home/luc/virtualenvs/py3/lib/python3.6/site-packages/sphinx/cmd/build.py", line 279, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/home/luc/virtualenvs/py3/lib/python3.6/site-packages/sphinx/application.py", line 277, in __init__
    self._init_builder()
  File "/home/luc/virtualenvs/py3/lib/python3.6/site-packages/sphinx/application.py", line 332, in _init_builder
    self.builder.init()
  File "/home/luc/virtualenvs/py3/lib/python3.6/site-packages/sphinx/builders/html/__init__.py", line 219, in init
    self.init_templates()
  File "/home/luc/virtualenvs/py3/lib/python3.6/site-packages/sphinx/builders/html/__init__.py", line 262, in init_templates
    self.templates.init(self, self.theme)
  File "/home/luc/virtualenvs/py3/lib/python3.6/site-packages/sphinx/jinja2glue.py", line 174, in init
    self.loaders = [SphinxFileSystemLoader(x) for x in loaderchain]
  File "/home/luc/virtualenvs/py3/lib/python3.6/site-packages/sphinx/jinja2glue.py", line 174, in <listcomp>
    self.loaders = [SphinxFileSystemLoader(x) for x in loaderchain]
  File "/home/luc/virtualenvs/py3/lib/python3.6/site-packages/jinja2/loaders.py", line 163, in __init__
    self.searchpath = list(searchpath)
TypeError: 'PosixPath' object is not iterable

Matthias Geier

unread,
Aug 25, 2020, 4:30:07 AM8/25/20
to Luc Saffre, sphinx...@googlegroups.com
On Tue, Aug 25, 2020 at 4:46 AM Luc Saffre wrote:
>
> Great work! Thanks for sharing here.
>
> I now switched to this theme for one of my private sites https://hw.saffre-rumma.net/

Cool! If you have any suggestions for improvements, please let me know!

> Luc
>
> PS After installing it as instructed, I had the following traceback. But it went away after saying "pip install -U jinja2" (i.e. i had some older version of jinja, sphinx_rtd_theme had no problems with that, but insipid had)

The insipid theme only has very little Python code:
https://github.com/mgeier/insipid-sphinx-theme/blob/master/src/insipid_sphinx_theme/__init__.py

But still, something must be different ...

Looking at the corresponding file of the sphinx_rtd_theme
(https://github.com/readthedocs/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/__init__.py),
I think the difference is that I'm using the more modern "pathlib"
while the RTD theme uses "os.path".

It looks like your older jinja2 version couldn't handle pathlib.Path objects.

It looks like support for pathlib has been added in version 2.11.

I've created a pull request to require the appropriate Jinja2 version:
https://github.com/mgeier/insipid-sphinx-theme/pull/13

If you find any other problems, please let me know!

cheers,
Matthias

Luc Saffre

unread,
Aug 25, 2020, 10:34:49 PM8/25/20
to Matthias Geier, sphinx...@googlegroups.com
On 25.08.20 11:29, Matthias Geier wrote:
If you find any other problems, please let me know!

One minor problem : the links to previous and next page are too big for my taste. Also the general docs title is a bit too big. (I guess that I can customize the relevant css, but if you agree with me, you maybe want to change the default size)

Luc

Matthias Geier

unread,
Aug 26, 2020, 4:18:16 AM8/26/20
to Luc Saffre, sphinx...@googlegroups.com
Yes, that sounds reasonable.
Do you have concrete font sizes that you would prefer?
Would you like to make a PR?
https://github.com/mgeier/insipid-sphinx-theme/pulls

cheers,
Matthias

Daniel Scott

unread,
Nov 25, 2020, 10:33:18 PM11/25/20
to sphinx...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages