Skip to content

Support new source names

Pre-release
Pre-release
Compare
Choose a tag to compare
@TimKam TimKam released this 13 May 17:42
· 25 commits to master since this release

#10

Since version 1.5.0, Sphinx is adding the source file extension to the source files it includes in the output folder.
For example, when your source file extension is rst (specified in the config variable source_suffix as [.rst], your index file appears in the output's source folder as index.rst.txt.
If you use a Sphinx version lower than 1.5.0, it appears as index.txt.
Here's the link to the PR that introduces the breaking change: sphinx-doc/sphinx#2454.

The solution adjust the file name/suffix based on the Sphinx version:

  • If you use Sphinx >=1.5, the file name will be filename + source_file_ending + ".txt".
  • If you use Sphinx < 1.5, the file name will be filename + ".txt".

The changes also add aconfig option that allows forcing a fallback to 2).
This will help folks who use this extension for a long time and whose templates evolved accordingly.