-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathstructureddata.api-ref.html
More file actions
125 lines (122 loc) · 4.72 KB
/
structureddata.api-ref.html
File metadata and controls
125 lines (122 loc) · 4.72 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{{- $pageData := .Page -}}
{{- $siteData := .Site -}}
{{- $pageUrl := printf "https://www.gooddata.com/docs/python-sdk%s" $pageData.RelPermalink -}}
{{- $breadcrumbsJson := partial "parseUrlBreadcrumbs.html" $pageUrl -}}
{{- $breadcrumbs := $breadcrumbsJson | unmarshal -}}
{{- /* Build path with /latest/ instead of version */ -}}
{{- $pathSegments := split (trim $pageData.RelPermalink "/") "/" -}}
{{- $latestPath := "" -}}
{{- range $seg := $pathSegments -}}
{{- if or (eq $seg "latest") (findRE `^\d+\.\d+` $seg) (eq $seg "dev") (eq $seg "master") -}}
{{- $latestPath = printf "%s/latest" $latestPath -}}
{{- else -}}
{{- $latestPath = printf "%s/%s" $latestPath $seg -}}
{{- end -}}
{{- end -}}
{{- $latestPath = printf "%s/" $latestPath -}}
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://www.gooddata.com/docs/python-sdk/latest/#website",
"url": "https://www.gooddata.com/docs/python-sdk/latest/"
},
{
"@type": "Organization",
"@id": "https://www.gooddata.com/#organization",
"name": "GoodData",
"url": "https://www.gooddata.com"
},
{
"@type": "TechArticle",
"@id": "https://www.gooddata.com/docs/python-sdk{{ $latestPath }}#article",
"headline": "{{ $pageData.Params.title }} | GoodData Python SDK",
"description": {{ if $pageData.Params.description }}{{ $pageData.Params.description | jsonify }}{{ else }}{{ $pageData.Summary | jsonify }}{{ end }},
"url": "https://www.gooddata.com/docs/python-sdk{{ $latestPath }}",
"dateModified": {{ $pageData.Params.lastmod | jsonify }},
"author": {
"@id": "https://www.gooddata.com/#organization"
},
"publisher": {
"@id": "https://www.gooddata.com/#organization"
},
"isPartOf": {
"@id": "https://www.gooddata.com/docs/python-sdk/latest/#website"
},
"about": {
"@id": "https://www.gooddata.com/docs/python-sdk/latest/#software"
},
"articleSection": {{ $pageData.Parent.Title | jsonify }},
"inLanguage": "en",
"mainEntity": {
"@type": "SoftwareSourceCode",
"name": {{ $pageData.Params.title | jsonify }},
"description": {{ if $pageData.Params.description }}{{ $pageData.Params.description | jsonify }}{{ else }}{{ $pageData.Summary | jsonify }}{{ end }},
"programmingLanguage": "Python",
"codeSampleType": "full",
"codeRepository": "https://github.com/gooddata/gooddata-python-sdk",
"runtimePlatform": "Python 3.13+",
"targetProduct": {
"@id": "https://www.gooddata.com/docs/python-sdk/latest/#software"
}
}
},
{
"@type": "WebPage",
"@id": "https://www.gooddata.com/docs/python-sdk{{ $latestPath }}#webpage",
"url": "https://www.gooddata.com/docs/python-sdk{{ $latestPath }}",
"name": "{{ $pageData.Params.title }} | GoodData Python SDK",
"isPartOf": {
"@id": "https://www.gooddata.com/docs/python-sdk/latest/#website"
},
"breadcrumb": {
"@id": "https://www.gooddata.com/docs/python-sdk{{ $latestPath }}#breadcrumb"
}
},
{
"@type": "BreadcrumbList",
"@id": "https://www.gooddata.com/docs/python-sdk{{ $latestPath }}#breadcrumb",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://www.gooddata.com"
},
{
"@type": "ListItem",
"position": 2,
"name": "Documentation",
"item": "https://www.gooddata.com/docs/"
},
{
"@type": "ListItem",
"position": 3,
"name": "Python SDK",
"item": "https://www.gooddata.com/docs/python-sdk/latest/"
}
{{- range $index, $breadcrumb := $breadcrumbs }}
{{- if ge $index 3 }}
{{- $segments := split (trim $breadcrumb "/") "/" }}
{{- $name := index $segments (sub (len $segments) 1) | humanize }}
{{- $latestBreadcrumb := "" }}
{{- range $seg := $segments }}
{{- if or (eq $seg "latest") (findRE `^\d+\.\d+` $seg) (eq $seg "dev") (eq $seg "master") }}
{{- $latestBreadcrumb = printf "%s/latest" $latestBreadcrumb }}
{{- else if and (ne $seg "") (ne $seg "https:") (ne $seg "www.gooddata.com") }}
{{- $latestBreadcrumb = printf "%s/%s" $latestBreadcrumb $seg }}
{{- end }}
{{- end }}
{{- $latestBreadcrumb = printf "https://www.gooddata.com%s/" $latestBreadcrumb }},
{
"@type": "ListItem",
"position": {{ add $index 1 }},
"name": {{ $name | jsonify }},
"item": {{ $latestBreadcrumb | jsonify }}
}{{- end }}
{{- end }}
]
}
]
}