Skip to content

Commit

Permalink
version badge inspired by Plot's documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Mar 6, 2024
1 parent e147f48 commit 8daa915
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sql.md
Expand Up @@ -5,7 +5,7 @@ sql:

# SQL

Observable Framework includes built-in support for client-side SQL powered by [DuckDB](./lib/duckdb). You can use SQL to query data from [CSV](./lib/csv), [TSV](./lib/csv), [JSON](./javascript/files#json), [Apache Arrow](./lib/arrow), and [Apache Parquet](./lib/arrow#apache-parquet) files, which can either be static or generated by [data loaders](./loaders).
Observable Framework includes built-in support for client-side SQL<a href="https://github.com/observablehq/framework/releases/tag/v1.2.0" target="_blank" class="observablehq-version-badge">^1.2.0</a> powered by [DuckDB](./lib/duckdb). You can use SQL to query data from [CSV](./lib/csv), [TSV](./lib/csv), [JSON](./javascript/files#json), [Apache Arrow](./lib/arrow), and [Apache Parquet](./lib/arrow#apache-parquet) files, which can either be static or generated by [data loaders](./loaders).

To use SQL, first register the desired tables in the page’s [front matter](./markdown#front-matter) using the **sql** option. Each key is a table name, and each value is the path to the corresponding data file. For example, to register a table named `gaia` from a Parquet file:

Expand Down
14 changes: 14 additions & 0 deletions docs/style.css
Expand Up @@ -34,3 +34,17 @@
display: none;
}
}

a.observablehq-version-badge {
font-size: 12px;
font-family: var(--sans-serif);
display: inline-block;
transform: translateY(-0.8em);
padding: 2px 8px;
color: var(--theme-foreground-focus);
background: color-mix(in srgb, var(--theme-foreground-focus), transparent 75%);
border-radius: 12px;
content: attr(data-version-badge);
text-decoration: underline;
text-underline-offset: 2px;
}

0 comments on commit 8daa915

Please sign in to comment.