From eb5cd46d06ca0b8658877c90e1284b17bfa7b830 Mon Sep 17 00:00:00 2001 From: DanStuder <100282876+DanStuder@users.noreply.github.com> Date: Thu, 23 Jan 2025 17:23:17 +0100 Subject: [PATCH] Add section about changing titles The page only explained how to set the title of one specific callout block. I suggest adding a new section about changing titles in general, also explaining how to change the default titles, as I suspect other users will find that very useful too. --- docs/authoring/callouts.qmd | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/authoring/callouts.qmd b/docs/authoring/callouts.qmd index df85a910d3..34dd44258c 100644 --- a/docs/authoring/callouts.qmd +++ b/docs/authoring/callouts.qmd @@ -68,14 +68,6 @@ This is an example of a 'folded' caution callout that can be expanded by the use ::: ``` -Note that above callout titles are defined by using a heading at the top of the callout. If you prefer, you can also specify the title using the `title` attribute. For example: - -```markdown -::: {.callout-tip title="Tip with Title"} -This is a callout with a title. -::: -``` - ## Customizing Appearance ### Collapse @@ -118,6 +110,26 @@ which appears as: Using callouts is an effective way to highlight content that your reader give special consideration or attention. ::: +### Title + +Note that above callout titles are defined by using a heading at the top of the callout. If you prefer, you can also specify the title using the `title` attribute. For example: + +```markdown +::: {.callout-tip title="Tip with Title"} +This is a callout with a title. +::: +``` +You can also change the default title of callout blocks for one page or the whole project, by adding the following lines to your documents yaml-header or your `_quarto.yaml` document respectively. + +```markdown +language: + callout-note-title: "New note title" + callout-warning-title: "New warning title" + callout-important-title: "New important title" + callout-tip-title: "New tip title" + callout-caution-title: "New caution title" +``` + ### Icons In addition to controlling the appearance of the callout, you can also choose to directly suppress the icon by setting the global option in your document (or project) yaml: