quarto-dev / quarto-dev/quarto-cli

Custom callout boxes

Open
#844 23 comments 25 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

callouts enhancement
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Firstly, many thanks for the fantastic package you are developing!

I am following from @athulsudheesh's comment in #556, to request a new feature for custom callout boxes.

One use case I have in mind is for exercises in books or course materials, for example:

:::{.callout-exercise}

Exercise description.

:::{.callout-answer collapse="true"}
The answer to the exercise
:::

:::

I guess these would have to be defined somewhere following a template (on the front matter? or on a separate YAML, that is then referenced on the front-matter?).

callout: "exercise"
    title: "Exercise"
    color: "purple"
    icon: "fa-question"
    collapse: "false"
callout: "answer"
    title: "Answer"
    color: "green"
    icon: "fa-pen"
    collapse: "true"    

Alternatively maybe this could be done through a generic callout with a couple of extra options, such as:

:::{.callout-custom color="purple" icon="fa-question"}
## Exercise

A purple callout block with a question mark icon.
:::

The disadvantage here is that there is more typing involved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing callout behavior and the discussion in #556, including the linked comment. Compare the proposed custom syntax and YAML configuration examples, then determine the supported design and verify that custom exercise and answer callouts render with their requested titles, colors, icons, and collapse behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, yaml
Domain
content, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.