Skip to content

Commit

Permalink
Fix display of nvm version when installing it for Contributing to Volto.
Browse files Browse the repository at this point in the history
We previously consolidated these instructions into a single include file, so the replacement is no longer needed, and it stopped working when we moved it into a code block.
  • Loading branch information
stevepiercy committed Nov 3, 2024
1 parent 430db45 commit aed5c9c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,20 +289,19 @@
# An extension that allows replacements for code blocks that
# are not supported in `rst_epilog` or other substitutions.
# https://stackoverflow.com/a/56328457/2214933
def source_replace(app, docname, source):
result = source[0]
for key in app.config.source_replacements:
result = result.replace(key, app.config.source_replacements[key])
source[0] = result
# def source_replace(app, docname, source):
# result = source[0]
# for key in app.config.source_replacements:
# result = result.replace(key, app.config.source_replacements[key])
# source[0] = result


# Dict of replacements.
source_replacements = {
"{NVM_VERSION}": "0.39.5",
}
# source_replacements = {
# }


def setup(app):
app.add_config_value("source_replacements", {}, True)
app.connect("source-read", source_replace)
# app.add_config_value("source_replacements", {}, True)
# app.connect("source-read", source_replace)
app.add_config_value("context", "volto", "env")
2 changes: 1 addition & 1 deletion docs/source/contributing/install-nvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For the `fish` shell, see [`nvm.fish`](https://github.com/jorgebucaran/nvm.fish)
2. Download and run the `nvm` install and update script, and pipe it into `bash`.

```shell
curl -o- https://raw.githubusercontent.com/creationix/nvm/v{NVM_VERSION}/install.sh | bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.5/install.sh | bash
```

3. Source your profile.
Expand Down

0 comments on commit aed5c9c

Please sign in to comment.