Visual diff
Get a list of documentation files that changed between the pull request and the latest version of the documentation, and see their differences highlighted visually on the documentation pages.
While seeing changes in source files is helpful, it can be difficult to understand how those changes will look in the rendered documentation, or their impact on the documentation as a whole. Read the Docs makes it easy to see the changes in the rendered documentation.
General settings
Ignored files
You can configure a list of files or patterns to be ignored when listing the files that changed in the pull request. This is useful when you have files that have a date in them, or listing/archive files that show changes without content changes in those files.
Go the Settings tab of your project.
Click on Addons, and click on File tree diff.
In the Ignored files field, add one or more patterns to ignore, one per line.
Click on Save.
Patterns are matched against the relative paths of the HTML files produced by the build,
you should try to match index.html
, not docs/index.rst
, nor /en/latest/index.html
.
Patterns can include one or more of the following special characters:
*
matches everything, including slashes.?
matches any single character.[seq]
matches any character inseq
.
Base version
The base version is the version of the documentation that is used to compare against the pull request.
By default, this is the latest
version of the documentation.
This is useful if your latest
version doesn’t point the default branch of your repository.
Note
This option can be changed by contacting Site support.
Limitations and known issues
The diff considers HTML files only.
The diff is done between the files from the latest successful build of the pull request and the default base version (latest by default). If your pull request gets out of sync with its base branch, the diff may not be accurate, and may show unrelated files and sections as changed.
The diff is done by comparing the “main content” of the HTML files. This means that some changes outside the main content, like header or footer, may not be detected. This is done to avoid showing changes that are not relevant to the documentation content itself. Like all pages being marked as changed because of a date or commit hash being updated in the footer.
Invisible changes. Some sections may be highlighted as changed, even when they haven’t actually visually changed. This can happen when the underlying HTML changes without a corresponding visual change, for example, if a link’s URL is updated
Tables may be shown to have changes when they have not actually changed. This is due to subtle variations in how HTML tables are rendered, and will be fixed in a future version.
The background of diff chunks may be incorrect when we are unable to detect the correct main parent element for the chunk.