From 484c54dcd25cf658b776d0fea64d9c3564abc33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20=C4=8Cech?= Date: Thu, 26 Oct 2023 15:03:31 +0200 Subject: [PATCH] RELATED: WEB-3993 Bump theme version --- docs/go.mod | 2 +- docs/go.sum | 2 ++ docs/layouts/shortcodes/python.html | 25 ++++++++++++++----------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/go.mod b/docs/go.mod index 74d515eff..f01cffb6f 100644 --- a/docs/go.mod +++ b/docs/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 // indirect - github.com/gooddata/gooddata-docs-theme v0.0.0-20231020110753-c96d5d57bff5 // indirect + github.com/gooddata/gooddata-docs-theme v0.0.0-20231026115610-865757c9da13 // indirect github.com/google/docsy v0.7.1 // indirect github.com/google/docsy/dependencies v0.7.1 // indirect github.com/twbs/bootstrap v5.3.1+incompatible // indirect diff --git a/docs/go.sum b/docs/go.sum index 76faa680f..f4fc7b3c6 100644 --- a/docs/go.sum +++ b/docs/go.sum @@ -8,6 +8,8 @@ github.com/gooddata/gooddata-docs-theme v0.0.0-20231017144305-7224c1251b71 h1:TP github.com/gooddata/gooddata-docs-theme v0.0.0-20231017144305-7224c1251b71/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA= github.com/gooddata/gooddata-docs-theme v0.0.0-20231020110753-c96d5d57bff5 h1:jN+ygmdMBAErl2GTH7scqopUXtRyM6HvaA2Mgx7CmtY= github.com/gooddata/gooddata-docs-theme v0.0.0-20231020110753-c96d5d57bff5/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA= +github.com/gooddata/gooddata-docs-theme v0.0.0-20231026115610-865757c9da13 h1:s6+8+l46mnvOU0SW3LD8thIBTNpv8xMhXxdJyIk+zbk= +github.com/gooddata/gooddata-docs-theme v0.0.0-20231026115610-865757c9da13/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA= github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY= github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc= github.com/google/docsy/dependencies v0.7.1 h1:NbzYKJYMin2q50xdWSUzR2c9gCp7zR/XHDBcxklEcTQ= diff --git a/docs/layouts/shortcodes/python.html b/docs/layouts/shortcodes/python.html index 4a211eb7c..b709742dd 100644 --- a/docs/layouts/shortcodes/python.html +++ b/docs/layouts/shortcodes/python.html @@ -1,19 +1,22 @@ {{ $page := .Page }} {{ $path := split (.Get 0) "." }} +{{ $version := partial "version.html" (dict "context" $page)}} -{{ with getJSON (printf "versioned_docs/%s/data.json" (partial "version.html" (dict "context" $page)).dirpath) }} - {{ $currentData := .}} - {{ range $path }} - {{ if (eq $currentData.kind "class") }} - {{ $currentData = $currentData.functions }} +{{ if $version }} + {{ with getJSON (printf "versioned_docs/%s/data.json" $version.dirpath) }} + {{ $currentData := .}} + {{ range $path }} + {{ if (eq $currentData.kind "class") }} + {{ $currentData = $currentData.functions }} + {{ end }} + {{$currentData = index $currentData .}} {{ end }} - {{$currentData = index $currentData .}} - {{ end }} - {{ $objData := $currentData }} + {{ $objData := $currentData }} -
- {{ partial "python-object.html" (dict "object" $objData "path" $path "context" $page) }} -
+
+ {{ partial "python-object.html" (dict "object" $objData "path" $path "context" $page) }} +
+ {{ end }} {{ end }}