diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html
index ad1c55a25161..aa1f278d51b5 100644
--- a/doc/_templates/layout.html
+++ b/doc/_templates/layout.html
@@ -82,7 +82,8 @@
{{ _('Navigation') }}
VERSION: '{{ release|e }}',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
- HAS_SOURCE: {{ has_source|lower }}
+ HAS_SOURCE: {{ has_source|lower }},
+ SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
};
{%- for scriptfile in script_files %}