Linked Data¶
Now check out the greeting2.ttl
:
@prefix : <https://example.org/>.
:greeting2
:message "hello";
:object :world.
:world
:wikipedia <https://en.wikipedia.org/wiki/Earth>.
Let’s generate documentation:
$ ./enola docgen --load "file:docs/models/example.org/greeting2.ttl" --output=file:///tmp/models/ --no-index
Loaded models have validation errors; use -v to show them
Use --no-validate to continue anyway
greeting2.md
now contains:
<https://example.org/greeting2>
* [`ex:message`](https://example.org/message): hello
* [`ex:object`](https://example.org/object): [`ex:world`](world.md)
* [🏺 `enola:origin` Origin](../enola.dev/origin.md): [greeting2.ttl](greeting2.ttl)
There are a couple of things worth noting here:
- We’ve introduced the
@prefix
shortcut, just to avoid repeatinghttps://example.org
. - Instead of a
hello, world
string, we’re now greeting an Object, thehttps://example.org/world
- this is what Linked Data is all about! - That
world
object contains yet another link, but this one is different… can you tell how & why, by clicking onworld
in the rendered Markdown below?