Skip to content

Commit d6d91a0

Browse files
authored
Merge pull request #1605 from quarto-dev/sync-1602-to-prerelease
[Sync to prerelease] Add code-links examples
2 parents 4c341e7 + 267bb7d commit d6d91a0

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs/manuscripts/components.qmd

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,11 @@ manuscript:
8989
Use `code-links` to add links that will appear on your manuscript webpage under the heading "Code Links". For example, the following adds a link to a Python script:
9090

9191
``` {.yaml filename="_quarto.yml"}
92-
---
9392
manuscript:
9493
code-links:
9594
- text: Data Import Code
9695
icon: file-code
9796
href: data-import.py
98-
---
9997
```
10098

10199
You can provide the following options for items in `code-links`:
@@ -114,11 +112,21 @@ There are also two special values you can pass as items to `code-links`:
114112

115113
`repo`
116114

117-
: Add a link to "GitHub Repo" under "Code Links" that points at the GitHub repository of your manuscript.
115+
: Add a link to "GitHub Repo" under "Code Links" that points at the GitHub repository of your manuscript:
116+
117+
```{.yaml filename="_quarto.yml"}
118+
manuscript:
119+
code-links: repo
120+
```
118121

119122
`binder`
120123

121-
: Add a link to “Launch Binder” under "Code Links" if your manuscript is configured to [Use Binder](#using-binder).
124+
: Add a link to “Launch Binder” under "Code Links" if your manuscript is configured to [Use Binder](#using-binder):
125+
126+
```{.yaml filename="_quarto.yml"}
127+
manuscript:
128+
code-links: binder
129+
```
122130

123131
## Including Other Resources
124132

0 commit comments

Comments
 (0)