Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sites/platform/config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ issuerepo: "https://github.com/platformsh/platformsh-docs/"
repo: "https://github.com/platformsh/platformsh-docs/"
folder: "sites/platform"
editPageButton: true
registryBaseURL: "https://master-7rqtwti-b3ghjlg3f5nug.eu-5.platformsh.site/image"

theme:
use_vendor: true
Expand Down
1 change: 1 addition & 0 deletions sites/upsun/config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ issuerepo: "https://github.com/platformsh/platformsh-docs/"
repo: "https://github.com/platformsh/platformsh-docs/"
folder: "sites/upsun"
editPageButton: true
registryBaseURL: "https://master-7rqtwti-b3ghjlg3f5nug.eu-5.platformsh.site/image"

theme:
use_vendor: true
Expand Down
1 change: 1 addition & 0 deletions sites/upsun/src/add-services/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export APP_REDIS_HOST="$(echo "$RELATIONSHIPS_JSON" | jq -r '.redis[0].host')"

The format of the relationship is identical whether your Redis service is [ephemeral](#ephemeral-redis) or [persistent](#persistent-redis).


## Persistent Redis

By default, Redis is an ephemeral service that stores data in memory.
Expand Down
8 changes: 0 additions & 8 deletions sites/upsun/src/add-services/valkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ Patch versions are applied periodically for bug fixes and the like. When you dep

{{< image-versions image="valkey" status="supported" environment="grid" >}}

<!-- uncomment this when Upsun deprecates Valkey v8.0

{{% deprecated-versions %}}

{{< image-versions image="valkey" status="deprecated" environment="grid" >}}

-->

## Service types

Depending on your needs, you can set up Valkey as [persistent](#persistent-valkey) or [ephemeral](#ephemeral-valkey).
Expand Down
33 changes: 17 additions & 16 deletions themes/psh-docs/layouts/shortcodes/image-versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@
{{ errorf "Incorrect environment param: %q. Possible values are grid, dedicated-gen-2, and dedicated-gen-3. Empty defaults to \"grid\". Image: %s" $envParam $image }}
{{ end }}

{{ if (index .Site.Data.registry $image $environment) }}
{{ if isset (index .Site.Data.registry $image $environment) $status }}
{{ if gt ( len ( index .Site.Data.registry $image $environment $status ) ) 0 }}
<ul>
{{ range index .Site.Data.registry $image $environment $status }}
<li>{{ . }}</li>
{{ end }}
</ul>
{{ else if ne $status "deprecated" }}
None available
{{ end }}
{{- $baseURL := .Site.Params.registryBaseURL -}}
{{- $url := printf "%s/%s?items=versions" $baseURL $image -}}
{{- $remote := resources.GetRemote $url -}}

{{- $data := $remote.Content | transform.Unmarshal | default dict -}}
{{- $versions := $data.versions | default dict -}}

{{ if index $versions $status }}
{{ if gt (len (index $versions $status)) 0 }}
<ul>
{{ range index $versions $status }}
<li>{{ . }}</li>
{{ end }}
</ul>
{{ else if ne $status "deprecated" }}
None
{{ end }}
{{ else }}
{{ if and (eq $envParam "dedicated") (eq $status "supported") }}
None available
{{ else }}
None available
{{ end }}
None
{{ end }}
20 changes: 17 additions & 3 deletions themes/psh-docs/layouts/shortcodes/latest.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{{- $arg := .Get 0 -}}
{{- $data := cond (eq $arg "composable") .Site.Data.composable_versions .Site.Data.registry -}}
{{- $supported := index $data $arg "versions" "supported" -}}
{{- index $supported 0 -}}
{{- $baseURL := .Site.Params.registryBaseURL -}}

{{- if eq $arg "composable" -}}
{{- $data := .Site.Data.composable_versions -}}
{{- $supported := index $data $arg "versions" "supported" -}}
{{- index $supported 0 | default "n/a" -}}
{{- else -}}
{{- $url := printf "%s/%s?items=versions,supported" $baseURL $arg -}}
{{- $remote := resources.GetRemote $url -}}
{{- if and $remote $remote.Content -}}
{{- $data := $remote.Content | transform.Unmarshal | default dict -}}
{{- $supported := $data.versions.supported | default slice -}}
{{- index $supported 0 | default "n/a" -}}
{{- else -}}
n/a
{{- end -}}
{{- end -}}
16 changes: 13 additions & 3 deletions themes/psh-docs/layouts/shortcodes/supported-services.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<!-- shortcode start {{ .Name }} -->
{{ $registry := .Site.Data.registry }}
{{ $baseURL := .Site.Params.registryBaseURL }}
{{- $remote := resources.GetRemote $baseURL -}}
{{- $registry := dict -}}

{{- if and $remote $remote.Content -}}
{{- $registry = $remote.Content | transform.Unmarshal | default dict -}}

| Service | `type` | Supported versions |
| ------- | ------ | ------------------ |{{ range sort $registry "type" }}{{ if eq .runtime false }}
| [{{ .name }}]({{ .docs.url }}){{ if .premium }} {{ partial "premium-features/badge" }}{{ end }} | `{{ .type }}` | {{ delimit .versions.supported ", " }} |{{ end }}{{ end }}
| ------- | ------ | ------------------ |
{{- range sort $registry "type" }}
{{- if eq .runtime false }}
| [{{ .name }}]({{ .docs.url }}){{ if .premium }} {{ partial "premium-features/badge" }}{{ end }} | `{{ .type }}` | {{ delimit .versions.supported ", " }} |
{{- end }}
{{- end }}
{{- end -}}
<!-- shortcode end {{ .Name }} -->
Loading