Skip to content

Commit 1308624

Browse files
publish annotation blog post (#239)
1 parent 7037bfd commit 1308624

3 files changed

Lines changed: 20 additions & 12 deletions

File tree

src/blog/2025-06-10-annotations-and-tags/annotation-header.png renamed to src/blog/2025-06-16-annotations-and-tags/annotation-header.png

File renamed without changes.

src/blog/2025-06-10-annotations-and-tags/index.malloynb renamed to src/blog/2025-06-16-annotations-and-tags/index.malloynb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ their annotation prefixes:
4949
* **prefix:** <code>/^# /</code>
5050
* Instructions to the Malloy rendering library
5151
* Example: `# chart { type=bar variant=stacked }`
52-
* Parsed by the renderer using the Malloy Tag Language
52+
* Parsed by the renderer using the Malloy Tag Language (See the [Render Tag Documentaion](https://github.com/malloydata/malloy/blob/main/packages/malloy-render/docs/renderer_tags_overview.md))
5353
* **prefix:** <code>/^##!/</code>
5454
* Flags to control the Malloy to SQL translator
5555
* Example: `##! experimental { featureName1 }`
56-
* Parsed by the Malloy translator, alsing using the Malloy Tag Language
56+
* Parsed by the Malloy translator, alsing using the Malloy Tag Language (See [Experimental Features](https://docs.malloydata.dev/documentation/experiments/experiments))
5757
* **prefix**: <code>/^#"/</code>
5858
* Doc strings for describing objects
5959
* Example: `#" This source requires a date filter expression (fex)`
@@ -103,6 +103,7 @@ but Malloy also has its own language for writing simple property-value data stru
103103
More details on the tag language [are in the documentation](https://docs.malloydata.dev/documentation/language/tags#tag-property-language),
104104
but here is a quick overview to give a flavor of the language.
105105

106+
106107
### Tag Values
107108

108109
* A tag has a value which can be a string or an array of values
@@ -111,15 +112,15 @@ but here is a quick overview to give a flavor of the language.
111112
* There is no boolean value, while you can use the strings `true` and `false` as values, the intention
112113
is that true/false conditions are indicated by presence/absence of a tag
113114

114-
```malloy
115-
# go_color=green
116-
# stop_color="red"
117-
# slow_colors=[yellow orange "yellowish orange"]
115+
```
116+
go_color=green
117+
stop_color="red"
118+
slow_colors=[yellow orange "yellowish orange"]
118119

119120
// a boolean ..
120-
# slowdown
121+
slowdown
121122
// turning off a boolean
122-
# -slowdown
123+
-slowdown
123124
```
124125

125126
### Tag Properties
@@ -129,10 +130,10 @@ This is unlike other property languages. A tag, in addition to values, can also
129130
* Properties on a tag can be set using the familiar `.` (dot) gesture
130131
* `{}` can be used to specify a number of properties at once
131132

132-
```malloy
133-
# currency=US_DOLLARS
134-
# currency.use_commas=false
135-
# currency { red_is_nagative font_size=13 }
133+
```
134+
slow_colors=[yellow orange "yellowish orange"]
135+
slow_colors.flashing
136+
slow_colors { blinks_per_minute=10 safetymode }
136137
```
137138

138139
## Sample Code For Annotation Usage

src/blog_posts.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
[
2+
{
3+
"title": "Metadata in Malloy",
4+
"path": "/2025-06-16-annotations-and-tags",
5+
"subtitle": "Annotations and Tags",
6+
"author": "Michael Toy",
7+
"published": "2025-06-16"
8+
},
29
{
310
"title": "Dataviz is Hierarchical",
411
"path": "/2024-02-29-hierarchical-viz",

0 commit comments

Comments
 (0)