Skip to content

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:

  1. We’ve introduced the @prefix shortcut, just to avoid repeating https://example.org.
  2. Instead of a hello, world string, we’re now greeting an Object, the https://example.org/world - this is what Linked Data is all about!
  3. That world object contains yet another link, but this one is different… can you tell how & why, by clicking on world in the rendered Markdown below?

https://example.org/greeting2