开发者

Some good Sphinx customization examples? [closed]

开发者 https://www.devze.com 2022-12-16 08:47 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_StackOverflow中文版

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 4 years ago.

Improve this question

I've created a Sphinx document using sphinx-quickstart.

  1. Are there any good examples/tutorials about customizing the look? Specifically to modify the header and add a logo.

  2. Are there some projects with downloadable Sphinx docs? I would like to see how they've customized their look.

update: Adding a logo is supported in the default setup, just not particularly well documented. Look in conf.py for the *_logo settings.`


Have a look at some of these themes. As the projects are open source you should be able to examine them closely.


Time to start collecting links.

  • https://github.com/coordt/ADCtheme - Apple-like
  • https://github.com/mitsuhiko/flask-sphinx-themes - Flask
  • http://loose-bits.com/2012/11/19/sphinx-bootstrap-theme-updates.html - Twitter Bootstrap
  • https://github.com/snide/sphinx_rtd_theme - Theme of Read the Docs
  • https://github.com/bitprophet/alabaster - Based on the Flask
  • https://gitlab.com/documatt/sphinx-themes - themes collection for tech writing


Matplotlib documentation is an excellent example I think. They even have a detailed description at documenting matplotlib: dynamically generated figures and inheritance diagrams are their custom extensions to Sphinx I think. Their documentation has a custom logo too.

I would guess that you should be able to download the RST document source for most projects.


http://docs.djangoproject.com/en/1.1/ and http://ask.github.com/celery/ are two good examples.


I've always liked the SQLAlchemy docs. They look very different from the standard Sphinx themes and fit very well into their site.


blender.org's new API Docs just got a makeover the sphinx theme is downloadable too

Site
http://www.blender.org/documentation/blender_python_api_2_59_release

Main Site (which theme is based off)
http://www.blender.org/

Theme files
https://svn.blender.org/svnroot/bf-blender/trunk/blender/doc/python_api/blender-org/

Just one example I know, but interesting to see how close the match is.


Go to the http://pypi.python.org and search for sphinx template there. It will give a list of some tens of templates. Then each of them You can download and try.


I'm a big fan of Kenneth Reitz's theme he uses for the requests library:

https://github.com/kennethreitz/kr-sphinx-themes

0

精彩评论

暂无评论...
验证码 换一张
取 消