Skip to content

Commit dd02f85

Browse files
KN4CK3Rpat-s
andcommitted
Add suggestions.
Co-authored-by: pat-s <[email protected]>
1 parent 6dfd20f commit dd02f85

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

docs/content/doc/packages/cran.en-us.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,10 @@ To work with the CRAN package registry, you need to install [the R toolset](http
2626

2727
## Configuring the package registry
2828

29-
To register the package registry you need to add it in your `Rprofile.site` file:
29+
To register the package registry you need to add it to `Rprofile.site`, either on the system-level, user-level (`~/.Rprofile`) or project-level:
3030

3131
```
32-
local({
33-
r <- list("gitea" = "https://gitea.example.com/api/packages/{owner}/cran")
34-
options(repos = r)
35-
})
32+
options("repos" = c(getOption("repos"), c(gitea="https://gitea.example.com/api/packages/{owner}/cran")))
3633
```
3734

3835
| Parameter | Description |

templates/package/content/cran.tmpl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
<div class="ui form">
55
<div class="field">
66
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.cran.registry" | Safe}}</label>
7-
<div class="markup"><pre class="code-block"><code>local({
8-
r &lt;- list("gitea" = "<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cran"></gitea-origin-url>")
9-
options(repos = r)
10-
})</code></pre></div>
7+
<div class="markup"><pre class="code-block"><code>options("repos" = c(getOption("repos"), c(gitea="<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cran"></gitea-origin-url>")))</code></pre></div>
118
</div>
129
<div class="field">
1310
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.cran.install"}}</label>

0 commit comments

Comments
 (0)