Skip to content

Commit 3ce9c0a

Browse files
committed
Include code for prefix use in examples
1 parent 6eea293 commit 3ce9c0a

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

_pages/create/examples.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ The `examples.yaml` file in `my-building-block` can be used as a template.
3535

3636
## Prefixes
3737

38-
Optionally, you can add a `prefixes` entry at the top level (alongside `examples:`) or inside a specific snippet,
38+
Optionally, you can add a `prefixes` entry at the top level (alongside `examples:`) or inside a specific example,
3939
with a dictionary of prefix-to-URI mappings, allowing you to omit those prefixes when used in JSON, JSON-LD and
40-
Turtle examples, but that will be used when semantically uplifting the snippets.
40+
Turtle examples, but that will be used when semantically uplifting the snippets:
41+
42+
```yaml
43+
prefixes:
44+
# Default prefixes for all examples
45+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
46+
rdfs: http://www.w3.org/2000/01/rdf-schema#
47+
examples:
48+
- title: Example with prefixes
49+
prefixes:
50+
ex: http://example.com/
51+
snippets:
52+
- language: turtle
53+
code: |
54+
ex:a rdfs:label "A" .
55+
```

0 commit comments

Comments
 (0)