quarto-dev / quarto-dev/quarto-cli

Mention the shortcodes option in "Creating Shortcodes"

Open
#14,283 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What would you like to do?

Report an issue on quarto.org

Description

Currently https://quarto.org/docs/extensions/shortcodes.html suggests that the only way to create a custom shortcode is by creating a new extension. This is a bit cumbersome for personal usage, e.g. I keep a repo of utilities as a subrepo/submodule of each of my different projects, for me a flat structure is more convenient in this case. Also for very basic shortcodes intended for a single project, creating an extension seems too much.

But shortcodes can be added to a project with minimal boilerplate, namely:

shortcodes:
  - shortcodes.lua

in the same way than custom filters. Unfortunately the documentation doesn't mention this for shortcodes. Moreover it does mention the analogue feature for filters in https://quarto.org/docs/extensions/filters.html, thus reinforcing the impression that it's not supported for shortcodes.

Please align both documents so that they make more obvious that this handy feature exists.

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

Start by reading the linked Creating Shortcodes and Filters pages and compare how each documents project-level customization. Update the shortcodes documentation to mention the shortcodes.lua project option and align its guidance with the filters page; done means both pages clearly describe this supported approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, yaml
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.