Skip to content

Commit f7bf07a

Browse files
authored
Merge pull request #49416 from SayakMukhopadhyay/upgrade-0.6
Upgrade Docsy to 0.6
2 parents a065ecc + e5d5384 commit f7bf07a

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ nohup.out
3232
.hugo_build.lock
3333

3434
# Netlify Functions build output
35-
package-lock.json
3635
/functions/
3736
/node_modules/
3837

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ FROM docker.io/library/golang:1.23.0-alpine3.20
2727
RUN apk add --no-cache \
2828
runuser \
2929
git \
30+
gcompat \
3031
openssh-client \
3132
rsync \
3233
npm

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ NETLIFY_FUNC = $(NODE_BIN)/netlify-lambda
77
# CONTAINER_ENGINE=podman make container-image
88
CONTAINER_ENGINE ?= docker
99
IMAGE_REGISTRY ?= gcr.io/k8s-staging-sig-docs
10-
IMAGE_VERSION=$(shell scripts/hash-files.sh Dockerfile Makefile | cut -c 1-12)
10+
IMAGE_VERSION=$(shell scripts/hash-files.sh Dockerfile Makefile package.json package-lock.json | cut -c 1-12)
1111
CONTAINER_IMAGE = $(IMAGE_REGISTRY)/k8s-website-hugo:v$(HUGO_VERSION)-$(IMAGE_VERSION)
1212
# Mount read-only to allow use with tools like Podman in SELinux mode
1313
# Container targets don't need to write into /src

content/en/docs/contribute/style/diagram-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ Figure 6. Pod Topology Spread Constraints.
473473

474474
Code block:
475475

476-
```
476+
```text
477477
graph TB
478478
subgraph "zoneB"
479479
n3(Node3)
@@ -528,7 +528,7 @@ Figure 7. Ingress
528528

529529
Code block:
530530

531-
```mermaid
531+
```text
532532
graph LR;
533533
client([client])-. Ingress-managed <br> load balancer .->ingress[Ingress];
534534
ingress-->|routing rule|service[Service];
@@ -556,7 +556,7 @@ K8s components to start a container.
556556

557557
Code block:
558558

559-
```
559+
```text
560560
%%{init:{"theme":"neutral"}}%%
561561
sequenceDiagram
562562
actor me
@@ -592,7 +592,7 @@ In the code for
592592
[figure 7](https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggIExSXG4gIGNsaWVudChbY2xpZW50XSktLiBJbmdyZXNzLW1hbmFnZWQgPGJyPiBsb2FkIGJhbGFuY2VyIC4tPmluZ3Jlc3NbSW5ncmVzc107XG4gIGluZ3Jlc3MtLT58cm91dGluZyBydWxlfHNlcnZpY2VbU2VydmljZV07XG4gIHN1YmdyYXBoIGNsdXN0ZXJcbiAgaW5ncmVzcztcbiAgc2VydmljZS0tPnBvZDFbUG9kXTtcbiAgc2VydmljZS0tPnBvZDJbUG9kXTtcbiAgZW5kXG4gIGNsYXNzRGVmIHBsYWluIGZpbGw6I2RkZCxzdHJva2U6I2ZmZixzdHJva2Utd2lkdGg6NHB4LGNvbG9yOiMwMDA7XG4gIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICBjbGFzc0RlZiBjbHVzdGVyIGZpbGw6I2ZmZixzdHJva2U6I2JiYixzdHJva2Utd2lkdGg6MnB4LGNvbG9yOiMzMjZjZTU7XG4gIGNsYXNzIGluZ3Jlc3Msc2VydmljZSxwb2QxLHBvZDIgazhzO1xuICBjbGFzcyBjbGllbnQgcGxhaW47XG4gIGNsYXNzIGNsdXN0ZXIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0),
593593
you can see examples of both.
594594

595-
```
595+
```text
596596
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff; // defines style for the k8s class
597597
class ingress,service,pod1,pod2 k8s; // k8s class is applied to elements ingress, service, pod1 and pod2.
598598
```

layouts/partials/hooks/head-end.html

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@
2525
{{- end -}}
2626
{{- end -}}
2727

28-
{{ if .HasShortcode "mermaid" }}
29-
<!-- Copied from https://unpkg.com/[email protected]/dist/mermaid.min.js -->
30-
{{- with resources.Get "js/mermaid-10.6.1.min.js" -}}
31-
<script src="{{ .RelPermalink }}" integrity="sha384-+NGfjU8KzpDLXRHduEqW+ZiJr2rIg+cidUVk7B51R5xK7cHwMKQfrdFwGdrq1Bcz"></script>
32-
{{- else -}}
33-
<!-- without Mermaid, the site won't appear right -->
34-
{{- errorf "No Mermaid helper script found" -}}
35-
{{- end -}}
36-
{{- end -}}
37-
3828
{{- if eq .Layout "glossary" -}}
3929
{{- with resources.Get "js/glossary.js" -}}
4030
<script defer src="{{ .RelPermalink }}"></script>

layouts/partials/scripts.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
<script src="{{ "js/script.js" | relURL }}"></script>
22

3+
{{/* Handle legacy Kubernetes shortcode for Mermaid diagrams */}}
4+
{{- if (.HasShortcode "mermaid") -}}
5+
{{ .Page.Store.Set "hasmermaid" true -}}
6+
{{- end -}}
7+
8+
{{/* future Docsy versions move this to partials/mermaid.html */}}
9+
{{- if .Page.Store.Get "hasmermaid" -}}
10+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js" integrity="sha512-IX+bU+wShHqfqaMHLMrtwi4nK6W/Z+QdZoL4kPNtRxI2wCLyHPMAdl3a43Fv1Foqv4AP+aiW6hg1dcrTt3xc+Q==" crossorigin="anonymous"></script>
11+
{{- end }}
12+
313
{{ $jsBs := resources.Get "vendor/bootstrap/dist/js/bootstrap.bundle.js" -}}
414
{{ $jsBase := resources.Get "js/base.js" }}
515
{{ $jsAnchor := resources.Get "js/anchor.js" }}
616
{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }}
7-
{{ $jsMermaid := resources.Get "js/mermaid.js" | resources.ExecuteAsTemplate "js/mermaid.js" . }}
817
{{ if .Site.Params.offlineSearch }}
918
{{ $jsSearch = resources.Get "js/offline-search.js" }}
1019
{{ end }}
11-
{{ $js := (slice $jsBs $jsBase $jsAnchor $jsSearch $jsMermaid) | resources.Concat "js/main.js" -}}
20+
{{ $js := (slice $jsBs $jsBase $jsAnchor $jsSearch) | resources.Concat "js/main.js" -}}
1221
{{ if hugo.IsProduction -}}
1322
{{ $js := $js | minify | fingerprint -}}
1423
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"></script>

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2+
"name": "kubernetes.io",
23
"private": true,
34
"scripts": {
45
"update:pkgs": "npx npm-check-updates -u"
56
},
67
"devDependencies": {
78
"autoprefixer": "^10.4.20",
8-
"docsy": "github:google/docsy#v0.5.x",
9+
"docsy": "github:google/docsy#semver:0.6.0",
910
"postcss-cli": "^11.0.0"
1011
},
1112
"spelling": "cSpell:ignore docsy pkgs -"

0 commit comments

Comments
 (0)