Move the quarto-tiers shortcode into the theme

Open
#213 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
lua, scss
Domain
documentation

Research direction

Read _extension.yml and compare its current contributes entries with the existing quarto-tiers.lua and quarto-tiers.css in the extension. Check how Quarto resolves the shortcode when both the theme and _extensions/quarto-tiers/ copy are installed, then test a site using project: type: posit-docs. Done means the shortcode loads from the theme, existing names and configuration still work, and the precedence behavior is confirmed.

Written by the indexing model from the issue text.

Description

The tier shortcode lives in a separate extension, posit-dev/quarto-tiers. Each change to badge styles needs a release in that repo and a separate update in each doc repo that uses it. Theme updates do not include it.

The two repos are separate because quarto-tiers existed before this theme. There is no technical reason to keep them apart. A Quarto extension can contribute a project type and shortcodes from the same _extension.yml.

Current state

Five doc repos install quarto-tiers. Three of them use an old version and do not have the dark mode and color contrast fixes from v3 and v4:

Repo quarto-tiers version
rstudio-pro 4.0.1
partnership-docs 4.0.1
connect 2.0.1
package-manager 2.0.2
shiny-server-pro 2.0.2

Proposal

  1. Move quarto-tiers.lua and quarto-tiers.css into _extensions/posit-docs/.
  2. Add shortcodes: [quarto-tiers.lua] under contributes in _extension.yml.
  3. Keep the tier shortcode name and the quarto-tiers: YAML key, so that existing pages and site configuration continue to work.
  4. Test that the shortcode loads in a site that uses project: type: posit-docs.
  5. Release the change in a theme version.

Sites that do not use the shortcode are not affected. The shortcode does not run unless a page calls it.

Migration

This has the same problem as the page actions move in #201. Each repo in the table above has a local copy in _extensions/quarto-tiers/, and a theme update does not remove it. Someone must manually delete that directory in each repo when the repo moves to the new theme version.

Before release, confirm what happens when a site has both the theme shortcode and the old _extensions/quarto-tiers/ copy installed. If the old copy takes priority, a site that updates the theme but keeps the old directory will continue to show the old badge styles.

Related: #178 (move content-switcher styles into the theme).

Dominant language
SCSS
Stars
6
Forks
5
Avg merge
8h 10m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from posit-dev/product-doc-theme

All issues in posit-dev/product-doc-theme

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.