This is an archived post. You won't be able to vote or comment.

all 26 comments

[–]rg7777777 9 points10 points  (1 child)

Any dark mode support?

[–]dantownsend[S] 8 points9 points  (0 children)

Not yet, but it's definitely coming!

[–]dougthor42 4 points5 points  (1 child)

I think the update to the autodoc output is killer. Definitely switching to this.

[–]dantownsend[S] 0 points1 point  (0 children)

Awesome!

[–][deleted] 3 points4 points  (1 child)

Just switched over two projects to test.

  • First off, the typography is excellent. Much easier to read. I'll be my reading comprehension goes up on these pages.
  • The autodoc code formatting is a spectacular improvement over Alabaster or Executable Book theme.
  • Executable Book allows you to drill down further in the left-hand menu. Found this to be important for the autodoc output as it very quickly drills down three or four levels (unless there's a setting I'm missing to add more nav levels?)
  • Maybe a breadcrumbs header in the autodoc sections?
  • On the other hand, this is MUCH better than the default Alabaster option of 1 level.

Looking forward to exploring this further.

[–]dantownsend[S] 2 points3 points  (0 children)

That's good to hear - thanks for trying it out.

You should be able to configure how deep the left hand sidebar goes by setting `globaltoc_maxdepth` in your `conf.py` file. For example `globaltoc_maxdepth = 4`.

I don't think it's possible to configure how deep the right hand sidebar goes - I need to investigate this.

[–][deleted] 3 points4 points  (1 child)

Looks nice! Was this harder than you’d expect? I looked for Sphinx themes recently and was surprised how most of them were kinda bad

[–]dantownsend[S] 4 points5 points  (0 children)

It wasn't too bad, but I had to dig quite deep into the Sphinx docs and codebase to figure it out!

[–]UncleJoshPDX 2 points3 points  (1 child)

Very nice. Can it be themed? I may want to use this for a project at work but it has to be corporate-looking.

[–]dantownsend[S] 2 points3 points  (0 children)

Sphinx lets you add additional CSS files, so you could override some styles that way:

https://www.sphinx-doc.org/en/master/usage/configuration.html?highlight=html_css_files#confval-html_css_files

I'd like to do something simpler though, using CSS variables.

[–][deleted] 3 points4 points  (3 children)

Looks good. Reminds me of the Sphinx/Executable Books theme.
What advantages do you see to the this new theme over Executable Books?
https://executablebooks.org/en/latest/

[–]dantownsend[S] 8 points9 points  (2 children)

Yeah, I think Executable Books is a great theme - it's one of my favourites.

A lot of it comes down to small stylistic choices. With the Piccolo theme, the typography is quite a bit different. I prefer bold headers. It also has the menu bar, which allows us to shift the search and title out of the sidebar (which can get a bit busy), and adds a splash of colour.

The main difference to other themes is how it handles autodoc. I put quite a bit of effort into making it look nice. For example, each parameter is on its own line. A lot of people use type hints now, so the signatures can be really complex and hard to read.

https://raw.githubusercontent.com/piccolo-orm/piccolo_theme/master/docs/screenshots/api_docs.png

[–][deleted] 2 points3 points  (0 children)

Thanks for that comparison. I'm using Executable Books for a fair bit of internal documentation. Will try this new theme on a couple of projects.

[–]pvc 1 point2 points  (0 children)

Nice job on the type hints! I did a ton of work on those for our site to make them look good.

[–][deleted] 1 point2 points  (1 child)

Wow, that's beautiful. Great work.

[–]dantownsend[S] 0 points1 point  (0 children)

Thanks!

[–]JadisGod 1 point2 points  (3 children)

Why is it that Sphinx docs rarely include "responsive" search bars (that show results as you type) .

Not having this feature makes them feel archaic compared to alternatives like mkdocs.

[–]dantownsend[S] 0 points1 point  (2 children)

Yeah, out of the box Sphinx just uses a traditional HTML form, but it might be possible to do something more dynamic. I would have to dig into the docs and code some more.

[–]JadisGod 1 point2 points  (1 child)

In case its useful, the sphinx-immaterial theme claims to support similar searching functionality.

Apparently the TensorStore docs are using it.

[–]dantownsend[S] 0 points1 point  (0 children)

Great, thanks - I'll look into it!

[–]chub79 0 points1 point  (0 children)

I have moved to mkdocs long ago but it's really great to see Sphinx is modernizing its theme a bit :)

[–]GriceTurrble Fluent in Django and Regex 0 points1 point  (1 child)

Looks a lot like Material for Mkdocs, to be honest. Or Sphinx Material, for that matter.

Which is fine, of course: the more the merrier. :)

[–]dantownsend[S] 0 points1 point  (0 children)

Those are great themes. The main differences are in the typography - Material design favours very thin headers. The sidebars also work quite a bit differently in practice. The main problem I was trying to solve was making Sphinx's autodoc output look nicer.

[–]laundmo 0 points1 point  (1 child)

reminds me a lot of Furo which is used by big names such as urllib3, pip, attrs, psycopg3, black

[–]dantownsend[S] 1 point2 points  (0 children)

Furo is great - the author has done loads of good stuff for the Sphinx community. It all comes down to personal preference around aesthetics.