Skip to content

Commit 47d8ad5

Browse files
Merge pull request #1219 from gooddata/snapshot-master-58b3e5db-to-rel/dev
[bot] Merge master/58b3e5db into rel/dev
2 parents fb1a406 + 58b3e5d commit 47d8ad5

File tree

8 files changed

+505
-1
lines changed

8 files changed

+505
-1
lines changed

docs/layouts/docs/baseof.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
{{ if .Params.externalLink }}
88
<meta http-equiv="refresh" content="0;url={{ .Params.externalLink }}" />
99
{{ end }}
10+
<script type="application/ld+json">
11+
{{ partial "structureddata/structureddata.looker.html" (dict "Page" . "Site" .Site) | safeJS }}
12+
</script>
1013
</head>
1114
<body class="td-{{ .Kind }}">
1215
{{ partial "gtm-body.html" }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<nav class="gd-docs-header-nav__center gd-header" aria-label="Main">
2+
<input type="checkbox" hidden tabindex="-1" id="gd-header-mobile-menu-trigger-input" name="gd-header-mobile-menu-trigger-input" class="gd-header-mobile gd-header-mobile-menu-trigger-input" aria-label="Open navigation menu" aria-controls="gd-header-mobile-menu" aria-expanded="false">
3+
<button id="gd-header-mobile-menu-button" tabindex="5" type="button" class="gd-header-mobile gd-header-mobile-menu-trigger" aria-controls="gd-header-mobile-menu" aria-expanded="false" aria-label="Open navigation menu">
4+
<span aria-hidden="true"></span>
5+
</button>
6+
<ul id="gd-header-mobile-menu" class="gd-docs-header-nav__menu gd-header-links">
7+
<li class="gd-docs-header-nav__menuitem gd-header-link-item gd-header-link-item-mobile-only">
8+
<a href="https://www.gooddata.com/learn/" class="gd-docs-header-nav__menulink gd-header-link gd-header-link__main">
9+
Learn
10+
</a>
11+
</li>
12+
<li class="gd-docs-header-nav__menuitem gd-header-link-item">
13+
<a href="https://university.gooddata.com/" class="gd-docs-header-nav__menulink gd-header-link">
14+
University
15+
</a>
16+
</li>
17+
<li class="gd-docs-header-nav__menuitem gd-header-link-item">
18+
<a href="https://community.gooddata.com/" class="gd-docs-header-nav__menulink gd-header-link">
19+
Community
20+
</a>
21+
</li>
22+
<li class="gd-docs-header-nav__menuitem gd-header-link-item">
23+
<a href="https://www.gooddata.com/docs/" class="gd-docs-header-nav__menulink gd-header-link gd-header-link__active">
24+
Documentation
25+
</a>
26+
</li>
27+
<li class="gd-docs-header-nav__menuitem gd-header-link-item">
28+
<a href="https://support.gooddata.com/hc/en-us" class="gd-docs-header-nav__menulink gd-header-link">
29+
Support
30+
</a>
31+
</li>
32+
<li class="gd-docs-header-nav__menuitem gd-header-link-item gd-header-link-item-mobile-only">
33+
<a href="https://www.gooddata.com/" class="gd-docs-header-nav__menulink gd-header-link">
34+
Go to GoodData.com
35+
</a>
36+
</li>
37+
</ul>
38+
</nav>

docs/layouts/partials/hooks/body-end.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<script src="/js/tab-order.js"></script>
1010

1111
{{/* additional scripts */}}
12-
<script src="/js/archive-link.js"></script>
1312
<script
1413
async
1514
src="https://widget.kapa.ai/kapa-widget.bundle.js"
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{{- $url := . -}}
2+
{{- $variant := "full" -}}
3+
4+
{{- /* Check if variant is passed as context (dict) or just the URL string */ -}}
5+
{{- if reflect.IsMap . -}}
6+
{{- $url = .url -}}
7+
{{- $variant = .variant | default "full" -}}
8+
{{- end -}}
9+
10+
{{- $urlObj := urls.Parse $url -}}
11+
{{- $host := printf "%s://%s" $urlObj.Scheme $urlObj.Host -}}
12+
{{- $pathname := $urlObj.Path -}}
13+
14+
{{- $breadcrumbs := slice -}}
15+
{{- $segments := split $pathname "/" -}}
16+
{{- $currentPath := "" -}}
17+
18+
{{- if eq $variant "before-version" -}}
19+
{{/* Variant 1: Return only the base path up to and including /latest/ or any version from Site.Params.versions */}}
20+
{{- $versionFound := false -}}
21+
{{- $versionIndex := 0 -}}
22+
23+
{{- range $index, $segment := $segments -}}
24+
{{- if ne $segment "" -}}
25+
{{/* Check if segment is "latest" */}}
26+
{{- if eq $segment "latest" -}}
27+
{{- $versionFound = true -}}
28+
{{- $versionIndex = $index -}}
29+
{{- else -}}
30+
{{/* Check if segment matches any version in Site.Params.versions or is a semantic version */}}
31+
{{- if and ($.Site.Params) ($.Site.Params.versions) -}}
32+
{{- range $.Site.Params.versions -}}
33+
{{- if eq $segment .version -}}
34+
{{- $versionFound = true -}}
35+
{{- $versionIndex = $index -}}
36+
{{- end -}}
37+
{{- end -}}
38+
{{- else -}}
39+
{{/* Fallback: check if segment looks like a version (1.51, 1.52, etc.) */}}
40+
{{- if or (eq $segment "dev") (eq $segment "master") (findRE `^\d+\.\d+` $segment) -}}
41+
{{- $versionFound = true -}}
42+
{{- $versionIndex = $index -}}
43+
{{- end -}}
44+
{{- end -}}
45+
{{- end -}}
46+
{{- end -}}
47+
{{- end -}}
48+
49+
{{- if $versionFound -}}
50+
{{- $currentPath = "" -}}
51+
{{- range $index, $segment := $segments -}}
52+
{{- if and (le $index $versionIndex) (ne $segment "") -}}
53+
{{- $currentPath = printf "%s%s/" $currentPath $segment -}}
54+
{{- end -}}
55+
{{- end -}}
56+
{{- $fullUrl := printf "%s/%s" $host $currentPath -}}
57+
{{- $breadcrumbs = $breadcrumbs | append $fullUrl -}}
58+
{{- end -}}
59+
60+
{{- else if eq $variant "after-version" -}}
61+
{{/* Variant 2: Start parsing from /latest/ or any version from Site.Params.versions */}}
62+
{{- $versionFound := false -}}
63+
{{- $startIndex := 0 -}}
64+
65+
{{- range $index, $segment := $segments -}}
66+
{{- if ne $segment "" -}}
67+
{{/* Check if segment is "latest" */}}
68+
{{- if eq $segment "latest" -}}
69+
{{- $versionFound = true -}}
70+
{{- $startIndex = $index -}}
71+
{{- else -}}
72+
{{/* Check if segment matches any version in Site.Params.versions or is a semantic version */}}
73+
{{- if and ($.Site.Params) ($.Site.Params.versions) -}}
74+
{{- range $.Site.Params.versions -}}
75+
{{- if eq $segment .version -}}
76+
{{- $versionFound = true -}}
77+
{{- $startIndex = $index -}}
78+
{{- end -}}
79+
{{- end -}}
80+
{{- else -}}
81+
{{/* Fallback: check if segment looks like a version (1.51, 1.52, etc.) */}}
82+
{{- if or (eq $segment "dev") (eq $segment "master") (findRE `^\d+\.\d+` $segment) -}}
83+
{{- $versionFound = true -}}
84+
{{- $startIndex = $index -}}
85+
{{- end -}}
86+
{{- end -}}
87+
{{- end -}}
88+
{{- end -}}
89+
{{- end -}}
90+
91+
{{- if $versionFound -}}
92+
{{- $currentPath = "" -}}
93+
{{- range $index, $segment := $segments -}}
94+
{{- if and (ge $index $startIndex) (ne $segment "") -}}
95+
{{- $currentPath = printf "%s%s/" $currentPath $segment -}}
96+
{{- $fullUrl := printf "%s/%s" $host $currentPath -}}
97+
{{- $breadcrumbs = $breadcrumbs | append $fullUrl -}}
98+
{{- end -}}
99+
{{- end -}}
100+
{{- end -}}
101+
102+
{{- else -}}
103+
{{/* Default variant: Parse all segments */}}
104+
{{- range $segments -}}
105+
{{- if ne . "" -}}
106+
{{- $currentPath = printf "%s%s/" $currentPath . -}}
107+
{{- $fullUrl := printf "%s/%s" $host $currentPath -}}
108+
{{- $breadcrumbs = $breadcrumbs | append $fullUrl -}}
109+
{{- end -}}
110+
{{- end -}}
111+
{{- end -}}
112+
113+
{{- if gt (len $breadcrumbs) 0 -}}
114+
{{- $breadcrumbs | jsonify }}
115+
{{- else -}}
116+
[]{{- end -}}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{{- $pageData := .Page -}}
2+
{{- $siteData := .Site -}}
3+
4+
{{- $pageUrl := printf "https://www.gooddata.com%s" $pageData.RelPermalink -}}
5+
{{- $basePathVersionJson := partial "parseUrlBreadcrumbs.html" (dict "url" $pageUrl "variant" "before-version") -}}
6+
{{- $basePathVersionArray := $basePathVersionJson | unmarshal -}}
7+
{{- $basePathVersion := cond (gt (len $basePathVersionArray) 0) (index $basePathVersionArray 0) "https://www.gooddata.com/docs/python-sdk/latest/" -}}
8+
{{- $breadcrumbsJson := partial "parseUrlBreadcrumbs.html" (dict "url" $pageUrl "variant" "after-version") -}}
9+
{{- $breadcrumbs := $breadcrumbsJson | unmarshal -}}
10+
11+
{
12+
"@context": "https://schema.org",
13+
"@graph": [
14+
{
15+
"@type": "WebSite",
16+
"@id": "{{ $basePathVersion }}#website",
17+
"url": {{ $basePathVersion | jsonify }}
18+
},
19+
{
20+
"@type": "Organization",
21+
"@id": "https://www.gooddata.com/#organization",
22+
"name": "GoodData",
23+
"url": "https://www.gooddata.com"
24+
},
25+
{
26+
"@type": "TechArticle",
27+
"@id": "https://www.gooddata.com{{ $pageData.RelPermalink }}#article",
28+
"headline": "{{ $pageData.Params.title }} | GoodData Python SDK",
29+
"description": {{ if $pageData.Params.description }}{{ $pageData.Params.description | jsonify }}{{ else }}{{ $pageData.Summary | jsonify }}{{ end }},
30+
"url": "https://www.gooddata.com{{ $pageData.RelPermalink }}",
31+
"dateModified": {{ $pageData.Params.lastmod | jsonify }},
32+
"author": {
33+
"@id": "https://www.gooddata.com/#organization"
34+
},
35+
"publisher": {
36+
"@id": "https://www.gooddata.com/#organization"
37+
},
38+
"isPartOf": {
39+
"@id": "{{ $basePathVersion }}#website"
40+
},
41+
"about": {
42+
"@id": "{{ $basePathVersion }}#software"
43+
},
44+
"articleSection": {{ $pageData.Parent.Title | jsonify }},
45+
"inLanguage": "en",
46+
"mainEntity": {
47+
"@type": "SoftwareSourceCode",
48+
"name": {{ $pageData.Params.title | jsonify }},
49+
"description": {{ if $pageData.Params.description }}{{ $pageData.Params.description | jsonify }}{{ else }}{{ $pageData.Summary | jsonify }}{{ end }},
50+
"programmingLanguage": "Python",
51+
"codeSampleType": "full",
52+
"codeRepository": "https://github.com/gooddata/gooddata-python-sdk",
53+
"runtimePlatform": "Python 3.13+",
54+
"targetProduct": {
55+
"@id": "{{ $basePathVersion }}#software"
56+
}
57+
}
58+
},
59+
{
60+
"@type": "WebPage",
61+
"@id": "https://www.gooddata.com/docs/python-sdk/latest/administration/organization/update_name/#webpage",
62+
"url": "https://www.gooddata.com/docs/python-sdk/latest/administration/organization/update_name/",
63+
"name": "{{ $pageData.Params.title }} | GoodData Python SDK",
64+
"isPartOf": {
65+
"@id": "{{ $basePathVersion }}#website"
66+
},
67+
"breadcrumb": {
68+
"@id": "https://www.gooddata.com{{ $pageData.RelPermalink }}#breadcrumb"
69+
}
70+
},
71+
{
72+
"@type": "BreadcrumbList",
73+
"@id": "https://www.gooddata.com{{ $pageData.RelPermalink }}#breadcrumb",
74+
"itemListElement": [
75+
{
76+
"@type": "ListItem",
77+
"position": 1,
78+
"name": "Home",
79+
"item": "https://www.gooddata.com"
80+
},
81+
{
82+
"@type": "ListItem",
83+
"position": 2,
84+
"name": "Documentation",
85+
"item": "https://www.gooddata.com/docs/"
86+
}{{- range $index, $breadcrumb := $breadcrumbs }}
87+
{{- $segments := split (trim $breadcrumb "/") "/" }}
88+
{{- $name := cond (eq (add $index 3) 3) "Python SDK" (index $segments (sub (len $segments) 1) | humanize) }},
89+
{
90+
"@type": "ListItem",
91+
"position": {{ add $index 3 }},
92+
"name": {{ $name | jsonify }},
93+
"item": {{ $breadcrumb | jsonify }}
94+
}{{- end }}
95+
]
96+
}
97+
]
98+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{{- $pageData := .Page -}}
2+
{{- $siteData := .Site -}}
3+
4+
{{- $pageUrl := printf "https://www.gooddata.com%s" $pageData.RelPermalink -}}
5+
{{- $basePathVersionJson := partial "parseUrlBreadcrumbs.html" (dict "url" $pageUrl "variant" "before-version") -}}
6+
{{- $basePathVersionArray := $basePathVersionJson | unmarshal -}}
7+
{{- $basePathVersion := cond (gt (len $basePathVersionArray) 0) (index $basePathVersionArray 0) "https://www.gooddata.com/docs/python-sdk/latest/" -}}
8+
{{- $breadcrumbsJson := partial "parseUrlBreadcrumbs.html" (dict "url" $pageUrl "variant" "after-version") -}}
9+
{{- $breadcrumbs := $breadcrumbsJson | unmarshal -}}
10+
11+
{
12+
"@context": "https://schema.org",
13+
"@graph": [
14+
{
15+
"@type": "WebSite",
16+
"@id": "{{ $basePathVersion }}#website",
17+
"url": {{ $basePathVersion | jsonify }}
18+
},
19+
{
20+
"@type": "Organization",
21+
"@id": "https://www.gooddata.com/#organization",
22+
"name": "GoodData",
23+
"url": "https://www.gooddata.com"
24+
},
25+
{
26+
"@type": "TechArticle",
27+
"@id": "https://www.gooddata.com{{ $pageData.RelPermalink }}#article",
28+
"headline": "{{ $pageData.Params.title }} | GoodData Python SDK",
29+
"description":{{ if $pageData.Params.description }}{{ $pageData.Params.description | jsonify }}{{ else }}{{ $pageData.Summary | jsonify }}{{ end }},
30+
"url": "https://www.gooddata.com{{ $pageData.RelPermalink }}",
31+
"dateModified": {{ $pageData.Params.lastmod | jsonify }},
32+
"author": {
33+
"@id": "https://www.gooddata.com/#organization"
34+
},
35+
"publisher": {
36+
"@id": "https://www.gooddata.com/#organization"
37+
},
38+
"isPartOf": {
39+
"@id": "{{ $basePathVersion }}#website"
40+
},
41+
"about": {
42+
"@id": "{{ $basePathVersion }}#software"
43+
},
44+
"articleSection": {{ $pageData.Parent.Title | jsonify }},
45+
"inLanguage": "en"
46+
},
47+
{
48+
"@type": "WebPage",
49+
"@id": "https://www.gooddata.com{{ $pageData.RelPermalink }}#webpage",
50+
"url": "https://www.gooddata.com{{ $pageData.RelPermalink }}",
51+
"name": "{{ $pageData.Params.title }} | GoodData Python SDK",
52+
"isPartOf": {
53+
"@id": "{{ $basePathVersion }}#website"
54+
},
55+
"breadcrumb": {
56+
"@id": "https://www.gooddata.com{{ $pageData.RelPermalink }}#breadcrumb"
57+
}
58+
},
59+
{
60+
"@type": "BreadcrumbList",
61+
"@id": "https://www.gooddata.com{{ $pageData.RelPermalink }}#breadcrumb",
62+
"itemListElement": [
63+
{
64+
"@type": "ListItem",
65+
"position": 1,
66+
"name": "Home",
67+
"item": "https://www.gooddata.com"
68+
},
69+
{
70+
"@type": "ListItem",
71+
"position": 2,
72+
"name": "Documentation",
73+
"item": "https://www.gooddata.com/docs/"
74+
}{{- range $index, $breadcrumb := $breadcrumbs }}
75+
{{- $segments := split (trim $breadcrumb "/") "/" }}
76+
{{- $name := cond (eq (add $index 3) 3) "Python SDK" (index $segments (sub (len $segments) 1) | humanize) }},
77+
{
78+
"@type": "ListItem",
79+
"position": {{ add $index 3 }},
80+
"name": {{ $name | jsonify }},
81+
"item": {{ $breadcrumb | jsonify }}
82+
}{{- end }}
83+
]
84+
}
85+
]
86+
}

0 commit comments

Comments
 (0)