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 docs/models/example.org/greeting2.ttl --output=/tmp/models/ --no-index

greeting2.md now contains:

[https://example.org/greeting2](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](../file/home/runner/work/enola/enola/docs/models/example.org/greeting2.ttl.md)

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