Links
AI / Agents
gdtest-tbl-shortcode
A showcase site demonstrating the Quarto shortcode. All tables are rendered from data files in assets/ — no Python code cells needed.
tbl-preview Quarto shortcode showcase with CSV, TSV, and JSONL data files in assets/. Five user-guide pages exercise every shortcode parameter — caption, columns, n_head, n_tail, show_all, show_row_numbers, show_dtypes, show_dimensions, max_col_width — plus multi-table pages and wide-table horizontal scroll. No Python code cells; all rendering is done via the shortcode.
Source files
assets/
products.tsv
product category price stock rating Widget Electronics 29.99 150 4.5 Gadget Tools 49.50 80 3.8 Gizmo Kitchen 12.00 300 4.9 Doohickey Garden 8.75 0 4.2 Thingamajig Office 199.99 25 2.1 Contraption Electronics 65.00 44 3.5 Apparatus Tools 120.00 12 4.7
server_logs.jsonl
{"timestamp":"2025-01-15T08:30:00","level":"INFO","module":"auth","message":"User login successful"}
{"timestamp":"2025-01-15T08:31:12","level":"WARNING","module":"db","message":"Slow query detected (3.2s)"}
{"timestamp":"2025-01-15T08:32:45","level":"ERROR","module":"api","message":"Request timeout on /v2/users"}
{"timestamp":"2025-01-15T08:33:01","level":"INFO","module":"cache","message":"Cache miss for key user:42"}
{"timestamp":"2025-01-15T08:34:20","level":"DEBUG","module":"auth","message":"Token refresh for session abc123"}
{"timestamp":"2025-01-15T08:35:55","level":"ERROR","module":"db","message":"Connection pool exhausted"}students.csv
name,subject,score,grade,passed Alice,Math,95.5,A,true Bob,Science,82.0,B,true Charlie,English,71.3,C,true Diana,History,60.0,D,true Eve,Art,55.8,F,false Frank,Math,88.2,B+,true Grace,Science,79.9,C+,true Hank,English,91.0,A-,true Iris,History,66.4,D+,true Jack,Art,73.7,C,true
wide_metrics.csv
metric,jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec revenue,120.5,135.2,128.7,142.3,155.8,148.9,162.1,170.4,165.3,178.2,185.6,192.0 costs,80.1,82.3,79.5,85.2,90.1,88.7,95.3,100.2,97.8,105.1,110.3,115.0 users,1200,1350,1280,1420,1558,1489,1621,1704,1653,1782,1856,1920 sessions,3500,3800,3600,4100,4500,4200,4800,5100,4900,5300,5600,5800 conversion,3.2,3.5,3.1,3.8,4.0,3.7,4.2,4.5,4.3,4.6,4.8,5.0
gdtest_tbl_shortcode/
__init__.py
"""Shortcode demo package."""
__version__ = "0.1.0"
__all__ = ["describe"]
def describe(name: str) -> str:
"""Describe a dataset by name.
Parameters
----------
name
The dataset name.
Returns
-------
str
A human-readable description.
"""
return f"Dataset: {name}"user_guide/
01-csv-basics.qmd
---
title: CSV via Shortcode
---
## Default Preview
The simplest usage — just point at a CSV file:
{{< tbl-preview file="assets/students.csv" >}}
## With Caption
Add a descriptive caption:
{{< tbl-preview file="assets/students.csv" caption="Student Scores — Fall 2025" >}}
## Column Subset
Show only selected columns:
{{< tbl-preview file="assets/students.csv" columns="name,score,grade" show_all="true" >}}02-tsv-files.qmd
---
title: TSV via Shortcode
---
## Product Inventory
Tab-delimited files work just the same:
{{< tbl-preview file="assets/products.tsv" show_all="true" >}}
## Head Only
Show just the first 3 rows:
{{< tbl-preview file="assets/products.tsv" n_head="3" n_tail="0" >}}03-jsonl-files.qmd
---
title: JSONL via Shortcode
---
## Server Logs
JSONL (newline-delimited JSON) files are auto-detected:
{{< tbl-preview file="assets/server_logs.jsonl" show_all="true" >}}
## With Narrow Columns
Constrain column widths to see truncation:
{{< tbl-preview file="assets/server_logs.jsonl" show_all="true" max_col_width="120" >}}04-shortcode-options.qmd
---
title: Shortcode Options
---
## Show All Rows
{{< tbl-preview file="assets/students.csv" show_all="true" >}}
## Custom Head/Tail Split
{{< tbl-preview file="assets/students.csv" n_head="3" n_tail="2" >}}
## Hide Row Numbers
{{< tbl-preview file="assets/students.csv" show_all="true" show_row_numbers="false" >}}
## Hide Dtype Labels
{{< tbl-preview file="assets/students.csv" show_all="true" show_dtypes="false" >}}
## Hide Dimensions Banner
{{< tbl-preview file="assets/students.csv" show_all="true" show_dimensions="false" >}}
## Minimal Chrome
No row numbers, no dtypes, no dimensions — just the data:
{{< tbl-preview file="assets/students.csv" show_all="true" show_row_numbers="false" show_dtypes="false" show_dimensions="false" >}}05-multiple-tables.qmd
---
title: Multiple Tables
---
## Side-by-Side Comparisons
Multiple shortcodes on one page, each with different files:
### Students (CSV)
{{< tbl-preview file="assets/students.csv" n_head="3" n_tail="0" caption="Top 3 Students" >}}
### Products (TSV)
{{< tbl-preview file="assets/products.tsv" n_head="3" n_tail="0" caption="Top 3 Products" >}}
### Server Logs (JSONL)
{{< tbl-preview file="assets/server_logs.jsonl" n_head="3" n_tail="0" caption="Recent Logs" >}}
## Wide Table
A 13-column metrics table with horizontal scroll:
{{< tbl-preview file="assets/wide_metrics.csv" show_all="true" caption="Monthly Metrics 2025" >}}README.md
# gdtest-tbl-shortcode
A showcase site demonstrating the `{{< tbl-preview >}}` Quarto
shortcode. All tables are rendered from data files in `assets/`
— no Python code cells needed.great-docs.yml
{}