Skip to content

Is there a way to define a "base theme"? #45

Answered by pradyunsg
astrojuanlu asked this question in Support
Discussion options

You must be logged in to vote

Hi there! This is certainly doable.

https://github.com/executablebooks/sphinx-book-theme/blob/master/src/sphinx_book_theme/theme/sphinx_book_theme/theme.conf#L2 is the information that Sphinx's templating engine AKA theme system needs to have.

Other than that, add a runtime dependency on it via project.dependencies and you should be good.

The derived theme can override specific templates as well as do a bunch of other stuff as it is a full Sphinx extension too. The parent theme is also loaded as an extension, IIRC.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@astrojuanlu
Comment options

@webknjaz
Comment options

@pradyunsg
Comment options

@webknjaz
Comment options

Answer selected by pradyunsg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants