1 | {
|
2 | "title": "Link",
|
3 | "@id": "stencila:Link",
|
4 | "extends": "Entity",
|
5 | "role": "secondary",
|
6 | "status": "unstable",
|
7 | "category": "prose",
|
8 | "description": "A hyperlink to other pages, sections within the same document, resources, or any URL.",
|
9 | "properties": {
|
10 | "type": {
|
11 | "@id": "schema:type",
|
12 | "description": "The name of the type.",
|
13 | "type": "string",
|
14 | "enum": [
|
15 | "Link"
|
16 | ],
|
17 | "default": "Link",
|
18 | "from": "Entity"
|
19 | },
|
20 | "id": {
|
21 | "@id": "schema:id",
|
22 | "description": "The identifier for this item.",
|
23 | "type": "string",
|
24 | "from": "Entity"
|
25 | },
|
26 | "meta": {
|
27 | "@id": "stencila:meta",
|
28 | "description": "Metadata associated with this item.",
|
29 | "type": "object",
|
30 | "from": "Entity"
|
31 | },
|
32 | "content": {
|
33 | "@id": "stencila:content",
|
34 | "description": "The textual content of the link.",
|
35 | "type": "array",
|
36 | "items": {
|
37 | "$ref": "InlineContent.schema.json"
|
38 | },
|
39 | "from": "Link",
|
40 | "isArray": true
|
41 | },
|
42 | "exportFrom": {
|
43 | "@id": "stencila:exportFrom",
|
44 | "aliases": [
|
45 | "export"
|
46 | ],
|
47 | "description": "A compilation directive giving the name of the variable to export\nto the link target.\n",
|
48 | "type": "string",
|
49 | "from": "Link"
|
50 | },
|
51 | "importTo": {
|
52 | "@id": "stencila:importTo",
|
53 | "aliases": [
|
54 | "import"
|
55 | ],
|
56 | "description": "A compilation directive giving the name of the variable to import\nthe link target as.\n",
|
57 | "type": "string",
|
58 | "from": "Link"
|
59 | },
|
60 | "target": {
|
61 | "@id": "stencila:target",
|
62 | "description": "The target of the link.",
|
63 | "type": "string",
|
64 | "format": "uri",
|
65 | "from": "Link"
|
66 | },
|
67 | "title": {
|
68 | "@id": "schema:headline",
|
69 | "description": "A title for the link.",
|
70 | "$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",
|
71 | "type": "string",
|
72 | "from": "Link"
|
73 | },
|
74 | "relation": {
|
75 | "@id": "schema:linkRelationship",
|
76 | "description": "The relation between the target and the current thing.",
|
77 | "type": "string",
|
78 | "from": "Link"
|
79 | }
|
80 | },
|
81 | "required": [
|
82 | "type",
|
83 | "content",
|
84 | "target"
|
85 | ],
|
86 | "file": "Link.schema.yaml",
|
87 | "children": [],
|
88 | "descendants": [],
|
89 | "$schema": "http://json-schema.org/draft-07/schema#",
|
90 | "$id": "https://schema.stenci.la/v0/Link.schema.json",
|
91 | "source": "https://github.com/stencila/schema/blob/master/Link.schema.yaml",
|
92 | "type": "object",
|
93 | "propertyAliases": {
|
94 | "export": "exportFrom",
|
95 | "import": "importTo"
|
96 | },
|
97 | "additionalProperties": false
|
98 | }
|