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:
- 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?