From 267bb7dfb2013aeccfd2a6c9da0fdd2b8cfc784f Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Tue, 1 Apr 2025 14:29:40 -0700 Subject: [PATCH] Add code-links examples (#1602) * Add code-links examples * Fix typo (cherry picked from commit 8cc62ab69208dc32de06ce5d6b3b2df4a2abedef) --- docs/manuscripts/components.qmd | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/manuscripts/components.qmd b/docs/manuscripts/components.qmd index 3896cc4ae4..2460e8e50f 100644 --- a/docs/manuscripts/components.qmd +++ b/docs/manuscripts/components.qmd @@ -89,13 +89,11 @@ manuscript: 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: ``` {.yaml filename="_quarto.yml"} ---- manuscript: code-links: - text: Data Import Code icon: file-code href: data-import.py ---- ``` 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`: `repo` -: Add a link to "GitHub Repo" under "Code Links" that points at the GitHub repository of your manuscript. +: Add a link to "GitHub Repo" under "Code Links" that points at the GitHub repository of your manuscript: + + ```{.yaml filename="_quarto.yml"} + manuscript: + code-links: repo + ``` `binder` -: Add a link to “Launch Binder” under "Code Links" if your manuscript is configured to [Use Binder](#using-binder). +: Add a link to “Launch Binder” under "Code Links" if your manuscript is configured to [Use Binder](#using-binder): + + ```{.yaml filename="_quarto.yml"} + manuscript: + code-links: binder + ``` ## Including Other Resources