File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 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" ,
280281html_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 )
You can’t perform that action at this time.
0 commit comments