Skip to content

Commit b247258

Browse files
committed
Resolve conflicts with 6-dev in conf.py
1 parent 8a4cca8 commit b247258

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/conf.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
# Ignore specific anchors
8282
r"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors#Identifying_the_issue",
8383
r"https://github.com/browserslist/browserslist#queries",
84+
r"https://github.com/plone/cookiecutter-zope-instance#options",
8485
r"https://github.com/plone/plone.docker#for-basic-usage",
8586
r"https://github.com/plone/plone.rest#cors",
8687
r"https://github.com/plone/plone.volto/blob/6f5382c74f668935527e962490b81cb72bf3bc94/src/kitconcept/volto/upgrades.py#L6-L54",
@@ -280,3 +281,21 @@
280281
html_context = {
281282
"edit_page_url_template": "https://6.dev-docs.plone.org/contributing/index.html?{{ file_name }}#making-contributions-on-github",
282283
}
284+
285+
# An extension that allows replacements for code blocks that
286+
# are not supported in `rst_epilog` or other substitutions.
287+
# https://stackoverflow.com/a/56328457/2214933
288+
def source_replace(app, docname, source):
289+
result = source[0]
290+
for key in app.config.source_replacements:
291+
result = result.replace(key, app.config.source_replacements[key])
292+
source[0] = result
293+
294+
# Dict of replacements.
295+
source_replacements = {
296+
"{PLONE_BACKEND_VERSION}": "6.0.0b2",
297+
}
298+
299+
def setup(app):
300+
app.add_config_value('source_replacements', {}, True)
301+
app.connect('source-read', source_replace)

0 commit comments

Comments
 (0)