Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
689cb3d
Add experimental Quarto 2 support
rich-iannone Nov 13, 2026
a8fb391
Escape markup in parameter names
rich-iannone Nov 13, 2026
6146dec
Use resolved Quarto executable for rendering
rich-iannone Nov 13, 2026
6070b7b
Adapt render globs for Quarto 2
rich-iannone Nov 13, 2026
3f89650
Make Lua extensions compatible with Quarto 2
rich-iannone Nov 13, 2026
1fe0ac6
Allow configuring the rendered output directory
rich-iannone Nov 13, 2026
328c89f
Align Gauntlet fixtures with build configuration
rich-iannone Nov 13, 2026
19415af
Use configured Quarto executable in render test
rich-iannone Nov 13, 2026
b77fc6c
Allow selecting rendered Gauntlet test directory
rich-iannone Nov 13, 2026
1156974
Use configured Quarto executable in filter tests
rich-iannone Nov 13, 2026
2f41187
Use resolved Quarto executable in metadata tests
rich-iannone Nov 13, 2026
0aca468
Use configured Quarto executable in filter tests
rich-iannone Nov 13, 2026
faa9221
Use resolved Quarto executable in render tests
rich-iannone Nov 13, 2026
45e0d82
Expand Quarto 2 compatibility tests
rich-iannone Nov 13, 2026
8c9a79d
Test recursive render globs for Quarto 2
rich-iannone Nov 13, 2026
9fa6249
Use configured Quarto in sidebar rendering tests
rich-iannone Nov 13, 2026
ac9688e
Use resolved Quarto path in social card tests
rich-iannone Nov 13, 2026
c936e23
Use configured Quarto executable in bundle tests
rich-iannone Nov 13, 2026
fba5484
Use configured Quarto executable in transcript tests
rich-iannone Nov 13, 2026
ae8c62e
Add experimental Quarto 2 Makefile targets
rich-iannone Nov 13, 2026
dc38220
Pass API reference availability to extensions
rich-iannone Nov 13, 2026
a7d3b44
Fix homepage heading styles in Quarto 2
rich-iannone Nov 13, 2026
c8bb3fa
Only register inventory for API reference sites
rich-iannone Nov 13, 2026
886d1bb
Support Quarto 2 stylesheets in rendered tests
rich-iannone Nov 13, 2026
4e90bf4
Test inventory publishing without API references
rich-iannone Nov 13, 2026
5683977
Add experimental Quarto 2 build adapter
rich-iannone Nov 14, 2026
0d9cdb9
Escape Markdown syntax for Quarto 2
rich-iannone Nov 14, 2026
afbf638
Use plain callable signatures with Quarto 2
rich-iannone Nov 14, 2026
f4a2d5e
Prepare pages for Quarto 2 in watch mode
rich-iannone Nov 14, 2026
f40fef2
Prepare pages before Quarto 2 rendering
rich-iannone Nov 14, 2026
43b6a8b
Include constant metadata tags in Quarto 2
rich-iannone Nov 14, 2026
88d4bec
Adapt Quarto 2 configuration before writing
rich-iannone Nov 14, 2026
3087845
Add Quarto 2 compatibility filters
rich-iannone Nov 14, 2026
3d3a393
Add Quarto 2 HTML post-render processing
rich-iannone Nov 14, 2026
617f8b7
Add project-environment Quarto 2 install
rich-iannone Nov 14, 2026
7619983
Add tests for experimental Quarto 2 support
rich-iannone Nov 14, 2026
b679acc
Merge remote-tracking branch 'origin/main' into experimental-q2-support
rich-iannone Nov 16, 2026
833de95
Require Quarto 2 version 0.46.0
rich-iannone Nov 17, 2026
bbe8725
Update Quarto 2 adaptation docs
rich-iannone Nov 17, 2026
78cfc18
Revert Lua helper execution to io.popen
rich-iannone Nov 17, 2026
f326c34
Remove Quarto 2 post-render marker handling
rich-iannone Nov 17, 2026
2b10e4f
Remove post-render marker application tests
rich-iannone Nov 17, 2026
e2c53fd
Update Quarto 2 minimum version test to 0.46.0
rich-iannone Nov 17, 2026
5526b92
Add indented code fencing helper for Quarto 2
rich-iannone Nov 17, 2026
cba2b98
Fence indented code across docstring sections
rich-iannone Nov 17, 2026
15cc26c
Remove homepage first-heading margin override
rich-iannone Nov 17, 2026
4ab6fd0
Tighten homepage heading spacing
rich-iannone Nov 17, 2026
0a7ee9f
Test indented code fencing for Quarto 2
rich-iannone Nov 17, 2026
a11d875
Extract Quarto emphasis escaping helper
rich-iannone Nov 24, 2026
5b9e0bc
Escape emphasis in string annotations
rich-iannone Nov 24, 2026
192b857
Escape type alias parameters in Markdown
rich-iannone Nov 24, 2026
416db61
Detect Quarto 2 social card support
rich-iannone Nov 24, 2026
041d8d5
Support native Quarto 2 social cards
rich-iannone Nov 24, 2026
ef18920
Pass native social card support to Q2 config
rich-iannone Nov 24, 2026
c6fcee3
Avoid duplicate social tags in newer Quarto 2
rich-iannone Nov 24, 2026
da62a9f
Test variadic alias escaping for Quarto 2
rich-iannone Nov 24, 2026
ab1d9f2
Extend Quarto 2 compatibility tests
rich-iannone Nov 24, 2026
ccea99e
Test Quarto 2 social card version threshold
rich-iannone Nov 24, 2026
e9abaf2
Merge branch 'main' into experimental-q2-support
rich-iannone Nov 24, 2026
b5252c8
Fix empty shortcode returns for Quarto 2
rich-iannone Nov 24, 2026
ab1e68f
Escape code text for Quarto 2
rich-iannone Nov 24, 2026
b698b60
Escape CLI help markup for Quarto 2
rich-iannone Nov 24, 2026
39ac86b
Test Quarto-specific escaping in CLI help
rich-iannone Nov 24, 2026
9a2e76b
Fix QMD authoring guide examples
rich-iannone Nov 24, 2026
784d0f6
Render page-tag styles as raw HTML
rich-iannone Nov 24, 2026
b5d1572
Render badge demo styles as raw HTML
rich-iannone Nov 24, 2026
7607fc5
Fix table explorer shortcode examples
rich-iannone Nov 24, 2026
30cd42a
Restore homepage sidebar placement in Quarto 2
rich-iannone Nov 24, 2026
c41bd87
Test homepage sidebar margin placement
rich-iannone Nov 24, 2026
3112b98
Support Quarto 2 navbar styling
rich-iannone Nov 25, 2026
5721eac
Adapt navbar logos for Quarto 2
rich-iannone Nov 25, 2026
10a48cf
Test light and dark navbar logo adaptation
rich-iannone Nov 25, 2026
83a2f3c
Fix MCP tile layout across Quarto versions
rich-iannone Nov 25, 2026
e4c170d
Support Quarto 2 sidebar markup and links
rich-iannone Nov 25, 2026
6df8779
Test shared sidebar support for Quarto 2
rich-iannone Nov 25, 2026
30effa5
Restore menu-text spans in Quarto 2 navbars
rich-iannone Nov 25, 2026
41e0740
Test navbar link text wrapping
rich-iannone Nov 25, 2026
7e7d668
Update quarto2.py
rich-iannone Nov 25, 2026
148124b
Restore Quarto 1 theme rules in Quarto 2 builds
rich-iannone Nov 25, 2026
70010be
Load Quarto 2 navigation script conditionally
rich-iannone Nov 25, 2026
692ac91
Restore navbar offset events in Quarto 2
rich-iannone Nov 25, 2026
63dea4f
Restore Quarto 1 content spacing for Quarto 2
rich-iannone Nov 25, 2026
e2992f3
Test Quarto 2 stylesheet integration
rich-iannone Nov 25, 2026
ab197ca
Test Quarto 2 navigation script inclusion
rich-iannone Nov 25, 2026
edfd653
Fix reference index links for Quarto 2
rich-iannone Nov 25, 2026
614a971
Add Quarto 2 signature highlighting spans
rich-iannone Nov 25, 2026
25f4edf
Update block.py
rich-iannone Nov 25, 2026
6e0efde
Support signature highlighting in Quarto 2
rich-iannone Nov 25, 2026
349d9e6
Preserve Arrow highlighting in Quarto 2
rich-iannone Nov 25, 2026
75dc0cf
Remove HTML highlight spans from Markdown
rich-iannone Nov 25, 2026
7b80f20
Support Quarto 2 syntax highlighting styles
rich-iannone Nov 25, 2026
18990ef
Test Quarto 2 signature highlighting spans
rich-iannone Nov 25, 2026
c101c24
Test Quarto 2 syntax highlighting defaults
rich-iannone Nov 25, 2026
38eb2fe
Restore Quarto 1 data frame table styling
rich-iannone Nov 26, 2026
a3a8bfc
Test Quarto 2 data frame table styling
rich-iannone Nov 26, 2026
31569c8
Restore Quarto 1 cell rendering behavior
rich-iannone Nov 26, 2026
fa0181d
Preserve retina plot sizing in Quarto 2
rich-iannone Nov 26, 2026
d83c465
Test Quarto figure format configuration
rich-iannone Nov 26, 2026
76ba122
Fix nested code fences in docstring guide
rich-iannone Nov 26, 2026
3e331a3
Space Quarto 2 page navigation
rich-iannone Nov 26, 2026
4d4e2e1
Copy extension stylesheet assets for Quarto 2
rich-iannone Nov 26, 2026
b916dbe
Test stylesheet dependency asset copying
rich-iannone Nov 26, 2026
409c1a9
Merge branch 'main' into experimental-q2-support
rich-iannone Dec 1, 2026
10cd2d7
Raise minimum Quarto 2 version to 0.48.0
rich-iannone Dec 1, 2026
31eaae0
Update render.py
rich-iannone Dec 1, 2026
1f0251a
Simplify Quarto 2 compatibility handling
rich-iannone Dec 1, 2026
5dbef09
Use default social card config for Quarto 2
rich-iannone Dec 1, 2026
35a6071
Stop injecting quarto2 navigation script
rich-iannone Dec 1, 2026
c499c50
Delete quarto2-nav.js
rich-iannone Dec 1, 2026
0478055
Remove obsolete Quarto 2 workarounds
rich-iannone Dec 1, 2026
92ad7ea
Remove Quarto 2 navbar and stylesheet workarounds
rich-iannone Dec 1, 2026
d3f1756
Remove outdated Quarto 2 spacing rules
rich-iannone Dec 1, 2026
eff5528
Align Quarto 2 tests with native behavior
rich-iannone Dec 1, 2026
9840058
Update tests for Quarto 2 minimum version 0.48.0
rich-iannone Dec 1, 2026
b655e77
Remove Quarto 2 script inclusion test
rich-iannone Dec 1, 2026
714f8ea
Prevent Quarto helpers from waiting on stdin
rich-iannone Dec 1, 2026
ed035c2
Test Quarto rendering uses empty standard input
rich-iannone Dec 1, 2026
0195b2d
Merge branch 'main' into experimental-q2-support
rich-iannone Dec 3, 2026
267c9f9
Assert Quarto render reports output
rich-iannone Dec 3, 2026
12b0d41
Fix custom node handling for Quarto 2.x
rich-iannone Dec 3, 2026
5eced80
Improve Quarto 2 Markdown compatibility
rich-iannone Dec 4, 2026
0964659
Use code_html for attribute signatures
rich-iannone Dec 4, 2026
ea1a9c2
Improve API reference Markdown escaping
rich-iannone Dec 4, 2026
ea969ab
Use shared HTML renderer for type aliases
rich-iannone Dec 4, 2026
470bbd4
Use code_html for signature blocks
rich-iannone Dec 4, 2026
16851c8
Improve Quarto failure and warning reporting
rich-iannone Dec 4, 2026
5d75192
Improve Quarto render failure message
rich-iannone Dec 4, 2026
e865036
Convert portable RST code and math directives
rich-iannone Dec 4, 2026
bc7fecb
Normalize RST links across docstring styles
rich-iannone Dec 4, 2026
37f2242
Escape Markdown markup in CLI reference text
rich-iannone Dec 4, 2026
73bc2ec
Escape tool parameter types and defaults
rich-iannone Dec 4, 2026
bce6a88
Escape shortcodes in changelog release notes
rich-iannone Dec 4, 2026
bf93947
Escape APA citation brackets for Quarto 2
rich-iannone Dec 4, 2026
31d8fb1
Prevent dependency tables from being parsed as Markdown
rich-iannone Dec 4, 2026
9e0b6c8
Expand RST normalization regression tests
rich-iannone Dec 4, 2026
c9624e6
Test Quarto signal failure messages
rich-iannone Dec 4, 2026
5206fad
Test shortcode escaping in changelog notes
rich-iannone Dec 4, 2026
a266d45
Test CLI parameter escaping for Quarto
rich-iannone Dec 4, 2026
a1089d0
Test escaped brackets in homepage citation
rich-iannone Dec 4, 2026
c1e6ef9
Test HTML escaping of MCP parameter metadata
rich-iannone Dec 4, 2026
b6ce03d
Test raw HTML dependency tables
rich-iannone Dec 4, 2026
0995df1
Expand Quarto 2 escaping tests
rich-iannone Dec 4, 2026
e3fa647
Test Quarto extension warning reporting
rich-iannone Dec 4, 2026
8b6e5fa
Escape docstring placeholders and line breaks
rich-iannone Dec 4, 2026
08bfb89
Resolve lint cross-references in object scope
rich-iannone Dec 4, 2026
14e3509
Prevent Quarto warnings in CLI reference pages
rich-iannone Dec 4, 2026
c1f5415
Resolve interlinks within documentation scope
rich-iannone Dec 4, 2026
2ab3e23
Mark footer HTML as raw to avoid Quarto warnings
rich-iannone Dec 4, 2026
40e50c1
Document scoped docstring cross-references
rich-iannone Dec 4, 2026
a0a5194
Mark repository widget HTML as raw inline
rich-iannone Dec 4, 2026
74aec55
Add raw HTML fencing for README blocks
rich-iannone Dec 4, 2026
6d4be0b
Fence README HTML blocks on the homepage
rich-iannone Dec 4, 2026
f4b7f62
Avoid raw HTML warnings in homepage margin
rich-iannone Dec 4, 2026
6163289
Avoid Quarto warnings in MCP reference pages
rich-iannone Dec 4, 2026
6b64605
Resolve references relative to API object scope
rich-iannone Dec 4, 2026
877e147
Update great-docs.scss
rich-iannone Dec 4, 2026
cb9350e
Wrap homepage sidebar in margin container
rich-iannone Dec 4, 2026
e16a912
Update footer tests for raw HTML markup
rich-iannone Dec 4, 2026
742d5b7
Add homepage HTML and sidebar rendering tests
rich-iannone Dec 4, 2026
e0ee8f7
Test scoped interlink resolution
rich-iannone Dec 4, 2026
6744b7a
Test scoped resolution of ambiguous references
rich-iannone Dec 4, 2026
713f350
Test scoped sibling references in ambiguity lint
rich-iannone Dec 4, 2026
c8f62ba
Expand placeholder and sidebar regression tests
rich-iannone Dec 4, 2026
7397689
Update footer overlay test for raw HTML markup
rich-iannone Dec 4, 2026
01c4db7
Merge branch 'main' into experimental-q2-support
rich-iannone Dec 4, 2026
89f10e6
Support site titles in Quarto 2
rich-iannone Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 102 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Available targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST)

.PHONY: test
test: ## Run core tests (fast, no package builds)
Expand Down Expand Up @@ -243,3 +243,104 @@ hub-deploy: ## Trigger GDG hub deployment to GitHub Pages (requires gh CLI)
@gh workflow run deploy.yml --repo posit-dev/gdg \
-f great_docs_ref=$$(git rev-parse --abbrev-ref HEAD) && \
echo "Deployment triggered. Watch at: https://github.com/posit-dev/gdg/actions"

# ── Quarto 2 (experimental) ──────────────────────────────────────────────────
# Q2 names the q2 binary: a path, or a command on PATH. The default is the first
# that exists of the one `make q2-install` puts in the project's environment, the
# one `make q2-upgrade` installs, a release build in a sibling checkout of
# quarto-dev/q2 (Q2_SRC), and `q2` on PATH. The Quarto 2 Gauntlet
# builds into its own directory, so it leaves the Quarto 1 build in
# test-packages/_rendered.
Q2_INSTALL_DIR ?= $(HOME)/.local/bin
Q2_SRC ?= ../q2
Q2 ?= $(firstword $(wildcard $(dir $(PYTHON))q2 $(Q2_INSTALL_DIR)/q2 $(Q2_SRC)/target/release/q2) q2)
Q2_BIN = $(if $(findstring /,$(Q2)),$(abspath $(Q2)),$(Q2))
Q2_RENDERED := test-packages/_rendered_q2
Q2_PORT ?= 3334
Q2_ENV = GREAT_DOCS_QUARTO="$(Q2_BIN)" GDG_RENDERED_DIR="$(CURDIR)/$(Q2_RENDERED)" \
PATH="$(abspath $(dir $(PYTHON))):$$PATH"

# Tests that render real projects with Quarto. Under Quarto 2 they run the
# bundled extensions and post-render scripts against q2's output.
Q2_RENDER_TESTS := \
tests/test_markdown_pages_filter.py \
tests/test_page_url_filter.py \
tests/test_description_render.py \
tests/test_metadata_partial_render.py \
tests/test_social_cards_render.py \
tests/test_shared_sidebar.py \
tests/test_term_transcript.py \
tests/test_term_bundle.py \
tests/test_parallel_render.py

.PHONY: q2-check
q2-check: ## Check that the Quarto 2 binary runs (override with Q2=path/to/q2)
@command -v "$(Q2_BIN)" > /dev/null 2>&1 || \
(echo "Quarto 2 not found at $(Q2). Install it with 'make q2-install', or pass Q2=path/to/q2." && exit 1)
@echo "Quarto 2: $(Q2_BIN) ($$("$(Q2_BIN)" --version))"

# Run q2's installer with the given options. Downloading it first, rather than
# piping curl into bash, makes a failed download fail the target.
Q2_INSTALLER := https://raw.githubusercontent.com/quarto-dev/q2/main/install.sh
q2_install = tmp=$$(mktemp) && trap 'rm -f "$$tmp"' EXIT && \
curl -fsSL $(Q2_INSTALLER) -o "$$tmp" && bash "$$tmp" --dest "$(Q2_INSTALL_DIR)" $(1)

.PHONY: q2-install
q2-install: ## Install or upgrade Quarto 2 from PyPI (the quarto2 package) in the project's environment
@uv pip install --python "$(PYTHON)" --upgrade quarto2

.PHONY: q2-upgrade
q2-upgrade: ## Install or upgrade Quarto 2 to the latest release in ~/.local/bin (Q2_VERSION=vX.Y.Z pins one; needs minisign)
@$(call q2_install,$(if $(Q2_VERSION),--version $(Q2_VERSION)))

.PHONY: q2-upgrade-nightly
q2-upgrade-nightly: ## Install or upgrade Quarto 2 to the latest nightly build from main, in ~/.local/bin
@$(call q2_install,--nightly)

.PHONY: q2-version
q2-version: ## Show the Quarto 2 in use, and the latest release, nightly build and commit on main
@echo "In use: $(Q2_BIN) ($$("$(Q2_BIN)" --version 2>/dev/null || echo not found))"
@if [ -d "$(Q2_SRC)/.git" ]; then \
echo "Source checkout: $(Q2_SRC) at $$(git -C "$(Q2_SRC)" log -1 --format='%h (%cs)')"; \
fi
@if command -v gh > /dev/null 2>&1; then \
tag=$$(gh release view -R quarto-dev/q2 --json tagName --jq .tagName) && \
echo "Latest release: $$tag ($$(gh api repos/quarto-dev/q2/commits/$$tag --jq '.sha[:9] + ", " + .commit.committer.date[:10]'))" && \
echo "Latest nightly: $$(gh release view nightly -R quarto-dev/q2 --json name --jq '.name | sub("^q2 nightly "; "")')" && \
echo "Latest on main: $$(gh api repos/quarto-dev/q2/commits/main --jq '.sha[:9] + " (" + .commit.committer.date[:10] + ") " + (.commit.message | split("\n")[0])')"; \
else \
echo "Install the gh CLI to see the latest release, nightly build and commit on main."; \
fi

.PHONY: q2-test
q2-test: q2-check ## Run the Quarto 2 unit tests, then the tests that render with Quarto, using Quarto 2
@$(PYTHON) -m pytest tests/test_quarto_check.py tests/test_quarto_yml.py -q
@$(Q2_ENV) $(PYTHON) -m pytest $(Q2_RENDER_TESTS) -n auto -o faulthandler_timeout=120 $(Q2_TEST_ARGS)

.PHONY: q2-test-gdg
q2-test-gdg: ## Run the GDG rendered-output tests against the Quarto 2 build (after q2-hub-build)
@test -d $(Q2_RENDERED) || (echo "No Quarto 2 GDG build found. Run 'make q2-hub-build' first." && exit 1)
@$(Q2_ENV) $(PYTHON) -m pytest tests/test_gdg_rendered.py -n auto $(Q2_TEST_ARGS)

.PHONY: q2-hub-build
q2-hub-build: q2-check ## Full build of the Great Docs Gauntlet with Quarto 2, into test-packages/_rendered_q2
@$(Q2_ENV) $(PYTHON) test-packages/render_all.py --build

.PHONY: q2-hub-resume
q2-hub-resume: q2-check ## Resume an interrupted Quarto 2 GDG build (skip already-ok packages)
@$(Q2_ENV) $(PYTHON) test-packages/render_all.py --build --skip-ok

.PHONY: q2-hub-rebuild
q2-hub-rebuild: q2-check ## Selective Quarto 2 GDG rebuild: make q2-hub-rebuild PKG="gdtest_minimal gdtest_github_icon"
@test -n "$(PKG)" || (echo "Usage: make q2-hub-rebuild PKG=\"name1 name2\"" && exit 1)
@$(Q2_ENV) $(PYTHON) test-packages/render_all.py --build --only $(PKG)

.PHONY: q2-hub-serve
q2-hub-serve: ## Serve the Quarto 2 Great Docs Gauntlet locally (port 3334, or Q2_PORT)
@GDG_RENDERED_DIR="$(CURDIR)/$(Q2_RENDERED)" $(PYTHON) test-packages/render_all.py --serve --port $(Q2_PORT)

.PHONY: q2-hub-open
q2-hub-open: ## Open the Quarto 2 Great Docs Gauntlet in the default browser
@open $(Q2_RENDERED)/_hub/index.html 2>/dev/null || \
xdg-open $(Q2_RENDERED)/_hub/index.html 2>/dev/null || \
echo "GDG page: $(Q2_RENDERED)/_hub/index.html"
6 changes: 3 additions & 3 deletions docs/user_guide/03-authoring-qmd-files.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Markdown provides several ways to emphasize text. Here's the syntax alongside wh
|--------|--------|---------|
| `*italic*` or `_italic_` | *italic* | Introducing terms, emphasis |
| `**bold**` or `__bold__` | **bold** | Strong emphasis, important terms |
| `***bold italic***` | ***bold italic*** | Rare, combined emphasis |
| `***bold italic***` | **_bold italic_** | Rare, combined emphasis |
| `` `code` `` | `code` | Function names, variables, file paths |
| `~~strikethrough~~` | ~~strikethrough~~ | Deprecated or removed content |

Expand Down Expand Up @@ -1034,7 +1034,7 @@ Write the path relative to the page's source file. A user guide page at
When the `include` shortcode references a code file (anything other than `.qmd` or `.md`), Great
Docs automatically wraps the file contents in a syntax-highlighted code block:

```markdown{shortcodes=false}
```{.markdown shortcodes=false}
{{{< include src/mypackage/examples/demo.py >}}}
```

Expand All @@ -1055,7 +1055,7 @@ Generally, include shortcodes should not be enclosed in code blocks, as the form
If your library already has runnable examples, tests, or configuration files that you want to
showcase in the documentation, point `include` at them directly:

```markdown{shortcodes=false}
```{.markdown shortcodes=false}
{{{< include src/mypackage/examples/usage.py >}}}
{{{< include tests/test_core.py lines="12-30" >}}}
{{{< include pyproject.toml >}}}
Expand Down
7 changes: 4 additions & 3 deletions docs/user_guide/04-writing-docstrings.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ actual backend connection count.
A mutable module-level variable is documented the same way as a constant, but its docstring should
emphasize valid values, defaults, and what happens when a user changes it:

```python
````python
timeout: int = 30
"""Seconds to wait before abandoning a request.

Expand All @@ -506,13 +506,14 @@ may want 120 or more.

Examples
--------
```{python}
```{{python}}
#| eval: false
import mypackage

mypackage.timeout = 60 # generous timeout for batch jobs
"""
```
"""
````

### Type Aliases

Expand Down
6 changes: 6 additions & 0 deletions docs/user_guide/12-cross-referencing.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ You can reference an object by a short name, writing `` [](`Cache`) `` rather th
neither claims it: the reference renders unlinked rather than pointing at whichever object came
first. Qualify the reference to fix it.

In a docstring, a reference that does not resolve on its own is also tried in the scope of the
documented object, nearest first. In the docstring of `mypkg.Frame.write`, `` [](`flush`) `` links
to `mypkg.Frame.flush` even when `mypkg.Cache.flush` also claims `flush`, so a See Also section
can name sibling methods as NumPy-style docstrings do. Code spans are not tried this way, since a
parameter often shares a method's name.

A name your package re-exports from a submodule outranks the other claims on it. If
`mypkg/__init__.py` imports `findinds` from `mypkg.maths`, then `` [](`findinds`) `` links to that
function even when a method `Frame.findinds` also claims the name, and the method stays reachable
Expand Down
2 changes: 2 additions & 0 deletions docs/user_guide/26-page-tags.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Great Docs lets you categorize pages with tags for improved discoverability. Add
guide, recipe, or custom section page via frontmatter, and Great Docs will generate a tags index
page, render tag pills above page titles, and support hierarchical tag organization.

```{=html}
<style>
.gd-demo-tag-pill, .gd-demo-tag-index, .gd-demo-tag-page-mock {
font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
Expand Down Expand Up @@ -112,6 +113,7 @@ body.quarto-dark .gd-demo-tag-seg-child { background-color: rgba(107,114,128,0.0
}
body.quarto-dark .gd-demo-tag-seg-sep { background-color: rgba(107,114,128,0.4); }
</style>
```

Tags are disabled by default. To enable them, add a `tags` section to `great-docs.yml`:

Expand Down
2 changes: 2 additions & 0 deletions docs/user_guide/27-page-status-badges.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ color, and description:

Here is how these five statuses look as page-level badges:

```{=html}
<style>
.gd-demo-badge, .gd-demo-sidebar-item, .gd-demo-sidebar-pill, .gd-demo-page-mock {
font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
Expand Down Expand Up @@ -114,6 +115,7 @@ body.quarto-dark .gd-demo-sidebar-list { border-color: #374151; }
}
body.quarto-dark .gd-demo-page-mock { border-color: #374151; }
</style>
```

<div style="display:flex; flex-direction:column; align-items:flex-start; gap:0.35rem; margin:1rem 0;">
<div class="gd-demo-badge" style="color:#10b981; background:rgba(16,185,129,0.08); border:1px solid rgba(16,185,129,0.25);"><span class="gd-demo-lbl">✦ New</span> <span class="gd-demo-dsc">&mdash; Recently added</span></div>
Expand Down
6 changes: 3 additions & 3 deletions docs/user_guide/33-table-explorer.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ tbl_explorer(
The `{{{< tbl-explorer >}}}` shortcode brings the interactive explorer to `.qmd` pages without
writing any Python. The `file=` parameter specifies the data file path relative to the `.qmd` file:

```{markdown}
{{< tbl-explorer file="data/example.csv" >}}
```markdown
{{{< tbl-explorer file="data/example.csv" >}}}
```

All parameters can be set as shortcode attributes:

```{markdown}
```markdown
{{{< tbl-explorer file="data.csv" page_size="25" sortable="true" >}}}
{{{< tbl-explorer file="data.csv" column_toggle="false" downloadable="false" >}}}
{{{< tbl-explorer file="data.csv" columns="name,department,salary" >}}}
Expand Down
12 changes: 11 additions & 1 deletion extensions/termshow/_extensions/termshow/termshow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ local function ensure_dependency()
})
end

--- Return nothing from a shortcode.
---
--- Quarto 2 has no `pandoc.Null`, so return no inlines there.
local function nothing()
if pandoc.Null then
return pandoc.Null()
end
return pandoc.Inlines({})
end

return {
["termshow"] = function(args, kwargs, meta)
-- Ensure player assets are included in the page
Expand All @@ -156,7 +166,7 @@ return {
end
if file == "" then
quarto.log.warning("[termshow] 'file' attribute is required")
return pandoc.Null()
return nothing()
end

-- A bundle, or the rendered output directory
Expand Down
Loading
Loading