This repository has been archived by the owner on Jan 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Link.schema.yaml
66 lines (66 loc) · 2.33 KB
/
Link.schema.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
title: Link
'@id': stencila:Link
extends: Entity
role: secondary
status: unstable
category: text
description: A hyperlink to other pages, sections within the same document, resources, or any URL.
$comment: |
Analogues of `Link` in other schema include:
- HTML [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
- JATS XML [`<ext-link>`](https://jats.nlm.nih.gov/articleauthoring/tag-library/1.2/element/ext-link.html)
- MDAST [`Link`](https://github.com/syntax-tree/mdast#link)
- OpenDocument [`<text:a>`](http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415212_253892949)
- Pandoc [`Link`](https://github.com/jgm/pandoc-types/blob/1.17.5.4/Text/Pandoc/Definition.hs#L270)
properties:
content:
'@id': stencila:content
description: The textual content of the link.
type: array
items:
$ref: InlineContent
exportFrom:
'@id': stencila:exportFrom
aliases:
- export
description: |
A compilation directive giving the name of the variable to export
to the link target.
type: string
importTo:
'@id': stencila:importTo
aliases:
- import
description: |
A compilation directive giving the name of the variable to import
the link target as.
type: string
target:
'@id': stencila:target
description: The target of the link.
type: string
# See http://json-schema.org/draft-06/json-schema-release-notes.html#formats-uri-vs-uri-reference
# for the difference between `uri` and `uri-reference`. The latter is more permissive, and is
# used here because it allows for intra-doc links using a #fragment only.
format: uri-reference
title:
'@id': schema:headline
description: A title for the link.
$comment: |
This property is analogous to the HTML `title` global attribute which
represents ["advisory information related to the element"](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title)
type: string
relation:
'@id': schema:linkRelationship
description:
The relation between the target and the current thing.
# See https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types
type: string
required:
- content
- target
examples:
- type: Link
content:
- Stencila’s website
target: https://stenci.la