UNPKG

3.47 kBJSONView Raw
1{
2 "title": "Link",
3 "@id": "stencila:Link",
4 "extends": "Entity",
5 "role": "secondary",
6 "status": "unstable",
7 "category": "text",
8 "description": "A hyperlink to other pages, sections within the same document, resources, or any URL.",
9 "$comment": "Analogues of `Link` in other schema include:\n - HTML [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)\n - JATS XML [`<ext-link>`](https://jats.nlm.nih.gov/articleauthoring/tag-library/1.2/element/ext-link.html)\n - MDAST [`Link`](https://github.com/syntax-tree/mdast#link)\n - OpenDocument [`<text:a>`](http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415212_253892949)\n - Pandoc [`Link`](https://github.com/jgm/pandoc-types/blob/1.17.5.4/Text/Pandoc/Definition.hs#L270)\n",
10 "properties": {
11 "type": {
12 "@id": "schema:type",
13 "description": "The name of the type.",
14 "type": "string",
15 "enum": [
16 "Link"
17 ],
18 "default": "Link",
19 "from": "Entity"
20 },
21 "id": {
22 "@id": "schema:id",
23 "description": "The identifier for this item.",
24 "type": "string",
25 "from": "Entity"
26 },
27 "meta": {
28 "@id": "stencila:meta",
29 "description": "Metadata associated with this item.",
30 "type": "object",
31 "from": "Entity"
32 },
33 "content": {
34 "@id": "stencila:content",
35 "description": "The textual content of the link.",
36 "type": "array",
37 "items": {
38 "$ref": "InlineContent.schema.json"
39 },
40 "from": "Link",
41 "isArray": true
42 },
43 "exportFrom": {
44 "@id": "stencila:exportFrom",
45 "aliases": [
46 "export"
47 ],
48 "description": "A compilation directive giving the name of the variable to export\nto the link target.\n",
49 "type": "string",
50 "from": "Link"
51 },
52 "importTo": {
53 "@id": "stencila:importTo",
54 "aliases": [
55 "import"
56 ],
57 "description": "A compilation directive giving the name of the variable to import\nthe link target as.\n",
58 "type": "string",
59 "from": "Link"
60 },
61 "target": {
62 "@id": "stencila:target",
63 "description": "The target of the link.",
64 "type": "string",
65 "format": "uri-reference",
66 "from": "Link"
67 },
68 "title": {
69 "@id": "schema:headline",
70 "description": "A title for the link.",
71 "$comment": "This property is analogous to the HTML `title` global attribute which\nrepresents [\"advisory information related to the element\"](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title)\n",
72 "type": "string",
73 "from": "Link"
74 },
75 "relation": {
76 "@id": "schema:linkRelationship",
77 "description": "The relation between the target and the current thing.",
78 "type": "string",
79 "from": "Link"
80 }
81 },
82 "required": [
83 "type",
84 "content",
85 "target"
86 ],
87 "examples": [
88 {
89 "type": "Link",
90 "content": [
91 "Stencila’s website"
92 ],
93 "target": "https://stenci.la"
94 }
95 ],
96 "file": "Link.schema.yaml",
97 "children": [],
98 "descendants": [],
99 "$schema": "http://json-schema.org/draft-07/schema#",
100 "$id": "https://schema.stenci.la/v1/Link.schema.json",
101 "source": "https://github.com/stencila/schema/blob/master/schema/Link.schema.yaml",
102 "type": "object",
103 "propertyAliases": {
104 "export": "exportFrom",
105 "import": "importTo"
106 },
107 "additionalProperties": false
108}