Skip to content

Commit

Permalink
Fix display of nvm version when installing it for Contributing to Vol…
Browse files Browse the repository at this point in the history
…to. (#6460)
  • Loading branch information
stevepiercy authored Nov 3, 2024
1 parent c9e6264 commit 278ca6c
Show file tree
Hide file tree
Showing 3 changed files with 11 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
1 change: 1 addition & 0 deletions packages/volto/news/6460.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix display of nvm version when installing it for Contributing to Volto. @stevepiercy

0 comments on commit 278ca6c

Please sign in to comment.