From b36b4ad3d54ee7ad9834a721cad93ff2a84a0ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Wed, 6 Mar 2024 20:08:58 +0100 Subject: [PATCH] version badge (#1000) * version badge inspired by Plot's documentation * badge tweaks * more badges --------- Co-authored-by: Mike Bostock --- docs/config.md | 2 +- docs/lib/echarts.md | 2 +- docs/markdown.md | 4 ++-- docs/sql.md | 2 +- docs/style.css | 14 ++++++++++++++ 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/config.md b/docs/config.md index d5fb99a5e..9faf2aa88 100644 --- a/docs/config.md +++ b/docs/config.md @@ -196,7 +196,7 @@ toc: false Whether to enable [search](./search) on the project; defaults to false. -## markdownIt +## markdownIt A hook for registering additional [markdown-it](https://github.com/markdown-it/markdown-it) plugins. For example, to use [markdown-it-footnote](https://github.com/markdown-it/markdown-it-footnote): diff --git a/docs/lib/echarts.md b/docs/lib/echarts.md index bd08bd9e4..08eebd86a 100644 --- a/docs/lib/echarts.md +++ b/docs/lib/echarts.md @@ -2,7 +2,7 @@ index: true --- -# Apache ECharts +# Apache ECharts [Apache ECharts](https://echarts.apache.org), an open-source JavaScript visualization library, is available by default as `echarts` in Markdown. You can also import it explicitly like so: diff --git a/docs/markdown.md b/docs/markdown.md index 6158252a2..941f7f11d 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -18,8 +18,8 @@ The front matter supports the following options: - **title** — the page title; defaults to the (first) first-level heading of the page, if any - **toc** — if false, disables the [table of contents](./config#toc) - **index** — whether to index this page if [search](./search) is enabled; defaults to true for listed pages -- **keywords** - additional words to index for [search](./search); boosted at the same weight as the title -- **draft** — whether to skip this page during build; drafts are also not listed in the default sidebar +- **keywords** - additional words to index for [search](./search); boosted at the same weight as the title +- **draft** — whether to skip this page during build; drafts are also not listed in the default sidebar ## Headings diff --git a/docs/sql.md b/docs/sql.md index 7bdaeb656..d5cbf4924 100644 --- a/docs/sql.md +++ b/docs/sql.md @@ -3,7 +3,7 @@ sql: gaia: ./lib/gaia-sample.parquet --- -# 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). diff --git a/docs/style.css b/docs/style.css index 247c4d867..4bd1b4fe9 100644 --- a/docs/style.css +++ b/docs/style.css @@ -34,3 +34,17 @@ display: none; } } + +a.observablehq-version-badge { + font: 500 12px var(--sans-serif); + display: inline-block; + vertical-align: top; + padding: 2px 8px; + color: var(--theme-green); + background: color-mix(in srgb, var(--theme-green), transparent 80%); + border-radius: 12px; +} + +.observablehq-version-badge::before { + content: "^" attr(data-version); +}