Skip to content

Commit b36b4ad

Browse files
Filmbostock
andauthored
version badge (#1000)
* version badge inspired by Plot's documentation * badge tweaks * more badges --------- Co-authored-by: Mike Bostock <[email protected]>
1 parent e147f48 commit b36b4ad

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

docs/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ toc: false
196196

197197
Whether to enable [search](./search) on the project; defaults to false.
198198

199-
## markdownIt
199+
## markdownIt <a href="https://github.com/observablehq/framework/releases/tag/v1.1.0" target="_blank" class="observablehq-version-badge" data-version="1.1.0" title="Added in v1.1.0"></a>
200200

201201
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):
202202

docs/lib/echarts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
index: true
33
---
44

5-
# Apache ECharts
5+
# Apache ECharts <a href="https://github.com/observablehq/framework/releases/tag/v1.1.0" target="_blank" class="observablehq-version-badge" data-version="1.1.0" title="Added in v1.1.0"></a>
66

77
[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:
88

docs/markdown.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ The front matter supports the following options:
1818
- **title** — the page title; defaults to the (first) first-level heading of the page, if any
1919
- **toc** — if false, disables the [table of contents](./config#toc)
2020
- **index** — whether to index this page if [search](./search) is enabled; defaults to true for listed pages
21-
- **keywords** - additional words to index for [search](./search); boosted at the same weight as the title
22-
- **draft** — whether to skip this page during build; drafts are also not listed in the default sidebar
21+
- **keywords** <a href="https://github.com/observablehq/framework/releases/tag/v1.1.0" target="_blank" class="observablehq-version-badge" data-version="1.1.0" title="Added in v1.1.0"></a> - additional words to index for [search](./search); boosted at the same weight as the title
22+
- **draft** <a href="https://github.com/observablehq/framework/releases/tag/v1.1.0" target="_blank" class="observablehq-version-badge" data-version="1.1.0" title="Added in v1.1.0"></a> — whether to skip this page during build; drafts are also not listed in the default sidebar
2323

2424
## Headings
2525

docs/sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sql:
33
gaia: ./lib/gaia-sample.parquet
44
---
55

6-
# SQL
6+
# SQL <a href="https://github.com/observablehq/framework/releases/tag/v1.2.0" target="_blank" class="observablehq-version-badge" data-version="1.2.0" title="Added in v1.2.0"></a>
77

88
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).
99

docs/style.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,17 @@
3434
display: none;
3535
}
3636
}
37+
38+
a.observablehq-version-badge {
39+
font: 500 12px var(--sans-serif);
40+
display: inline-block;
41+
vertical-align: top;
42+
padding: 2px 8px;
43+
color: var(--theme-green);
44+
background: color-mix(in srgb, var(--theme-green), transparent 80%);
45+
border-radius: 12px;
46+
}
47+
48+
.observablehq-version-badge::before {
49+
content: "^" attr(data-version);
50+
}

0 commit comments

Comments
 (0)