Skip to content
Merged
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
9 changes: 5 additions & 4 deletions documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ serve:
--disableFastRender \
--buildDrafts \
--buildFuture \
--ignoreCache
--ignoreCache \
--printI18nWarnings \
--printMemoryUsage \
--printPathWarnings \
Expand All @@ -14,17 +14,18 @@ serve:

production-build:
git submodule update --init --recursive
git fetch --tags
hugo version
hugo \
HUGO_KPT_VERSION=$$(git describe --tags --abbrev=0 2>/dev/null || true) hugo \
--minify
npx -y pagefind --site public

preview-build:
git submodule update --init --recursive
hugo \
git fetch --tags
HUGO_KPT_VERSION=$$(git describe --tags --abbrev=0 2>/dev/null || true) hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture \
--minify
npx -y pagefind --site public

9 changes: 9 additions & 0 deletions documentation/assets/scss/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,12 @@ section {
a:hover {
color: $link-hover-color !important;
}

// Homepage hero logo: pull it up to visually align with the H1, but only at
// the `lg` breakpoint and above where the two hero columns sit side-by-side.
// Below `lg`, the columns stack and the negative margin would cause overlap.
body.td-home .td-home-hero-logo {
@media (min-width: 992px) {
margin-top: -6rem;
}
}
2 changes: 1 addition & 1 deletion documentation/assets/scss/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a {
}
}

h1 {
h1:not(.h1) {
&.thin {
font-weight: 400;
}
Expand Down
4 changes: 2 additions & 2 deletions documentation/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ anchor = "smart"
[languages]
[languages.en]
title = "kpt documentation"
languageName ="English"
label = "English"
# Weight used for sorting.
weight = 1
contentDir = "content/en"
Expand Down Expand Up @@ -88,7 +88,7 @@ description = "kpt documentation"

[params]

kpt_version = "v1.0.0-beta.59"
kpt_version = "v1.0.0-beta.62.1"

code_of_conduct = "https://github.com/cncf/foundation/blob/main/code-of-conduct.md"

Expand Down
2 changes: 1 addition & 1 deletion documentation/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ toc_hide: true
kpt is a package-centric toolchain that enables a WYSIWYG configuration authoring, automation, and delivery experience, which simplifies managing Kubernetes platforms and KRM-driven infrastructure at scale by manipulating declarative Configuration as Data.
</div>
</div>
<div class="col-lg-6">
<div class="col-lg-6 text-center td-home-hero-logo">
<img src="/images/kpt_stacked_color.svg" alt="kpt logo" style="max-width: 300px;">
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ description: >
Deploy local packages to a cluster.
menu:
main:
identifier: "alpha-live"
parent: "alpha"
---

Expand Down
1 change: 1 addition & 0 deletions documentation/content/en/reference/cli/live/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ description: |
Deploy local packages to a cluster.
menu:
main:
identifier: "live"
parent: "References"
---
<!--mdtogo:Short
Expand Down
2 changes: 1 addition & 1 deletion documentation/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/kptdev/docs

go 1.26.3

require github.com/google/docsy v0.12.0 // indirect
require github.com/google/docsy v0.14.3 // indirect
8 changes: 4 additions & 4 deletions documentation/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.12.0 h1:CddZKL39YyJzawr8GTVaakvcUTCJRAAYdz7W0qfZ2P4=
github.com/google/docsy v0.12.0/go.mod h1:1bioDqA493neyFesaTvQ9reV0V2vYy+xUAnlnz7+miM=
github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.14.3 h1:4uFgPWTPj4NT79IboVkXGi49LLQadLVfU4WNOfD/s74=
github.com/google/docsy v0.14.3/go.mod h1:1Fj1W1O3esZh7IBQ8XAYtxtg10udBXuGI89+LUQc1AU=
github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
2 changes: 1 addition & 1 deletion documentation/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
{{ partial "toc.html" . }}
</aside>
<main class="col-12 col-md-9 col-xl-7 pl-md-5" role="main">
<main class="col-12 col-md-9 col-xl-7 ps-md-5" role="main">
{{ partial "version-banner.html" . }}
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
{{ with .Params.Category}}<div class="category"><i class="{{ lower . }}"></i>{{ upper . }}</div>{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion documentation/layouts/blog/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
{{ partial "toc.html" . }}
</aside>
<main class="col-12 col-md-9 col-xl-7 pl-md-5" role="main">
<main class="col-12 col-md-9 col-xl-7 ps-md-5" role="main">
{{ partial "version-banner.html" . }}
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
{{ with .Params.Category}}<div class="category"><i class="{{ lower . }}"></i>{{ upper . }}</div>{{ end }}
Expand Down
8 changes: 4 additions & 4 deletions documentation/layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<h2>{{ T "post_posts_in" }} {{ .Key }}</h2>
<ul class="list-unstyled mt-4">
{{ range .Pages }}
<li class="media mb-4">
<div class="media-body">
<h3 class="mt-3 mb-1"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h5>
<li class="d-flex mb-4">
<div class="flex-grow-1">
<h3 class="mt-3 mb-1"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3>
<p class="mb-2 mb-md-3"><small class="text-muted">{{ .Date.Format ($.Param "time_format_blog") }}</small></p>
{{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-left mr-3 pt-1 d-none d-md-block") }}
{{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-start me-3 pt-1 d-none d-md-block") }}
<p class="pt-0 mt-0">{{ .Plain | safeHTML | truncate 250 }}</p>
</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion documentation/layouts/partials/featured-image.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ $w := .w | default 480 }}
{{ $h := .h | default 180 }}
{{ $p := .p }}
{{ $class := .class | default "ml-3" }}
{{ $class := .class | default "ms-3" }}
{{ $image := ($p.Resources.ByType "image").GetMatch "**featured*" }}
{{ with $image }}
{{ $image := .Fill (printf "%dx%d" $w $h ) }}
Expand Down
8 changes: 4 additions & 4 deletions documentation/layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
<span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}{{ end }}</span>
</a>
<div class="td-navbar-nav-scroll ml-lg-auto mr-xl-5" id="main_navbar">
<div class="td-navbar-nav-scroll ms-lg-auto me-xl-5" id="main_navbar">
<ul class="navbar-nav mt-0 mt-lg-0">
{{ $p := . }}
{{ range .Site.Menus.main }}
<li class="nav-item mr-3 ml-3 mb-0 mb-lg-0">
<li class="nav-item me-3 ms-3 mb-0 mb-lg-0">
{{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) }}
{{ with .Page }}
{{ $active = or $active ( $.IsDescendant .) }}
Expand All @@ -18,12 +18,12 @@
</li>
{{ end }}
{{ if .Site.Params.versions }}
<li class="nav-item dropdown mr-4 d-none d-lg-block">
<li class="nav-item dropdown me-4 d-none d-lg-block">
{{ partial "navbar-version-selector.html" . }}
</li>
{{ end }}
{{ if (gt (len .Site.Home.Translations) 0) }}
<li class="nav-item dropdown mr-4 d-none d-lg-block">
<li class="nav-item dropdown me-4 d-none d-lg-block">
{{ partial "navbar-lang-selector.html" . }}
</li>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion documentation/layouts/partials/page-meta-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{ $editURL := printf "%s/edit/%s/%s" $gh_repo $gh_branch $gh_repo_path }}
{{ $issuesURL := printf "%s/issues/new?title=%s" $gh_repo (htmlEscape $.Title) }}

<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<div class="td-page-meta ms-2 pb-1 pt-2 mb-0">
<a href="{{ $editURL }}" target="_blank">
<i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}
</a>
Expand Down
85 changes: 1 addition & 84 deletions documentation/layouts/partials/sidebar-tree.html
Original file line number Diff line number Diff line change
@@ -1,84 +1 @@
{{/* We cache this partial for bigger sites and set the active class client side. */}}
{{ $sidebarCacheLimit := cond (isset .Site.Params.ui "sidebar_cache_limit") .Site.Params.ui.sidebar_cache_limit 2000 -}}
{{ $shouldDelayActive := ge (len .Site.Pages) $sidebarCacheLimit -}}
{{ $navRoot := cond (and (ne .Params.toc_root true) (eq .Site.Home.Type "docs")) .Site.Home .FirstSection -}}
<div id="td-sidebar-menu" class="td-sidebar__inner{{ if $shouldDelayActive }} d-none{{ end }}">
{{ if not .Site.Params.ui.sidebar_search_disable -}}
<form class="td-sidebar__search d-flex align-items-center">
{{ partial "search-input.html" . }}
{{ if or ( in $navRoot "whitepapers" ) ( in $navRoot "about" ) }}
<button class="hamburger" type="button" aria-label="Toggle Menu" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
{{ end }}
</form>
{{ else -}}
<div id="content-mobile">
<form class="td-sidebar__search d-flex align-items-center">
{{ partial "search-input.html" . }}
{{ if or ( in $navRoot "whitepapers" ) ( in $navRoot "about" ) }}
<button class="hamburger" type="button" aria-label="Toggle Menu" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
{{ end }}
</form>
</div>
<div id="content-desktop"></div>
{{ end -}}

<nav class="collapse td-sidebar-nav{{ if .Site.Params.ui.sidebar_menu_foldable }} foldable-nav{{ end }}" id="td-section-nav">
{{ if (gt (len .Site.Home.Translations) 0) -}}
<div class="nav-item dropdown d-block d-lg-none">
{{ partial "navbar-lang-selector.html" . }}
</div>
{{ end -}}
{{ $ulNr := 0 -}}
{{ $ulShow := cond (isset .Site.Params.ui "ul_show") .Site.Params.ui.ul_show 1 -}}
{{ $sidebarMenuTruncate := cond (isset .Site.Params.ui "sidebar_menu_truncate") .Site.Params.ui.sidebar_menu_truncate 50 -}}
<ul class="td-sidebar-nav__section pr-md-3 ul-{{ $ulNr }}">
{{ if or ( in $navRoot "whitepapers" ) ( in $navRoot "about" ) }}
{{ template "section-tree-nav-section" (dict "page" . "section" $navRoot "shouldDelayActive" $shouldDelayActive "sidebarMenuTruncate" $sidebarMenuTruncate "ulNr" $ulNr "ulShow" (add $ulShow 1)) }}
{{ end }}
</ul>
</nav>
</div>
{{ define "section-tree-nav-section" -}}
{{ $s := .section -}}
{{ $p := .page -}}
{{ $shouldDelayActive := .shouldDelayActive -}}
{{ $sidebarMenuTruncate := .sidebarMenuTruncate -}}
{{ $treeRoot := cond (eq .ulNr 0) true false -}}
{{ $ulNr := .ulNr -}}
{{ $ulShow := .ulShow -}}
{{ $active := and (not $shouldDelayActive) (eq $s $p) -}}
{{ $activePath := and (not $shouldDelayActive) (or (eq $p $s) ($p.IsDescendant $s)) -}}
{{ $show := cond (or (lt $ulNr $ulShow) $activePath (and (not $shouldDelayActive) (eq $s.Parent $p.Parent)) (and (not $shouldDelayActive) (eq $s.Parent $p)) (not $p.Site.Params.ui.sidebar_menu_compact) (and (not $shouldDelayActive) ($p.IsDescendant $s.Parent))) true false -}}
{{ $mid := printf "m-%s" ($s.RelPermalink | anchorize) -}}
{{ $pages_tmp := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true -}}
{{ $pages := $pages_tmp | first $sidebarMenuTruncate -}}
{{ $withChild := gt (len $pages) 0 -}}
{{ $manualLink := cond (isset $s.Params "manuallink") $s.Params.manualLink ( cond (isset $s.Params "manuallinkrelref") (relref $s $s.Params.manualLinkRelref) $s.RelPermalink) -}}
{{ $manualLinkTitle := cond (isset $s.Params "manuallinktitle") $s.Params.manualLinkTitle $s.Title -}}
<li class="td-sidebar-nav__section-title td-sidebar-nav__section{{ if $withChild }} with-child{{ else }} without-child{{ end }}{{ if $activePath }} active-path{{ end }}{{ if (not (or $show $p.Site.Params.ui.sidebar_menu_foldable )) }} collapse{{ end }}" id="{{ $mid }}-li">
{{ if (and $p.Site.Params.ui.sidebar_menu_foldable (ge $ulNr 1)) -}}
<input type="checkbox" id="{{ $mid }}-check"{{ if $activePath}} checked{{ end }}/>
<label for="{{ $mid }}-check"><a href="{{ $manualLink }}"{{ if ne $s.LinkTitle $manualLinkTitle }} title="{{ $manualLinkTitle }}"{{ end }}{{ with $s.Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }} class="align-left pl-0 {{ if $active}} active{{ end }} td-sidebar-link{{ if $s.IsPage }} td-sidebar-link__page{{ else }} td-sidebar-link__section{{ end }}{{ if $treeRoot }} tree-root{{ end }}" id="{{ $mid }}">{{ with $s.Params.Icon}}<i class="{{ . }}"></i>{{ end }}<span class="{{ if $active }}td-sidebar-nav-active-item{{ end }}">{{ $s.LinkTitle }}</span></a></label>
{{ else -}}
<a href="{{ $manualLink }}"{{ if ne $s.LinkTitle $manualLinkTitle }} title="{{ $manualLinkTitle }}"{{ end }}{{ with $s.Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }} class="align-left pl-0{{ if $active}} active{{ end }} td-sidebar-link{{ if $s.IsPage }} td-sidebar-link__page{{ else }} td-sidebar-link__section{{ end }}{{ if $treeRoot }} tree-root{{ end }}" id="{{ $mid }}">{{ with $s.Params.Icon}}<i class="{{ . }}"></i>{{ end }}<span class="{{ if $active }}td-sidebar-nav-active-item{{ end }}">{{ $s.LinkTitle }}</span></a>
{{- end }}
{{- if $withChild }}
{{- $ulNr := add $ulNr 1 }}
<ul class="ul-{{ $ulNr }}{{ if (gt $ulNr 1)}} foldable{{end}}">
{{ range $pages -}}
{{ if (not (and (eq $s $p.Site.Home) (eq .Params.toc_root true))) -}}
{{ template "section-tree-nav-section" (dict "page" $p "section" . "shouldDelayActive" $shouldDelayActive "sidebarMenuTruncate" $sidebarMenuTruncate "ulNr" $ulNr "ulShow" $ulShow) }}
{{- end }}
{{- end }}
</ul>
{{- end }}
</li>
{{- end }}
{{/* Sidebar intentionally disabled site-wide. */}}
Comment thread
aravindtga marked this conversation as resolved.
2 changes: 1 addition & 1 deletion documentation/layouts/partials/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ if not .Params.notoc }}
{{ with .TableOfContents }}
{{ if ge (len .) 200 }}
<div class="ml-2 mt-4 mb-2 toc-header">Page Contents</div>
<div class="ms-2 mt-4 mb-2 toc-header">Page Contents</div>
{{ . }}
{{ end }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion documentation/layouts/shortcodes/kpt_version.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{- .Site.Params.kpt_version | default "v1.0.0-beta.59" -}}
{{- getenv "HUGO_KPT_VERSION" | default .Site.Params.kpt_version -}}
8 changes: 4 additions & 4 deletions documentation/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ command = "make production-build"
ignore = "exit 1"

[build.environment]
NODE_VERSION = "18.16.1"
HUGO_VERSION = "0.147.8"
NODE_VERSION = "24.15.0"
HUGO_VERSION = "0.161.1"
HUGO_ENABLEGITINFO = "true"
GO_VERSION = "1.26.3"

[context.production.environment]
HUGO_ENV = "production"
NODE_VERSION = "18.16.1"
HUGO_VERSION = "0.147.8"
NODE_VERSION = "24.15.0"
HUGO_VERSION = "0.161.1"
HUGO_ENABLEGITINFO = "true"

[context.deploy-preview.environment]
Expand Down
5 changes: 2 additions & 3 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@
},
"devDependencies": {
"autoprefixer": "^10.4.21",
"hugo-extended": "^0.146.0",
"hugo-extended": "^0.161.1",
"postcss": "^8.5.6",
"postcss-cli": "^11.0.1"
},
"enginesComment": "Ensure that engines.node stays consistent with .nvmrc",
"engines": {
"node": "20.x"
"node": "24.15.0"
},
"words": "cSpell:ignore htmltest precheck refcache postget -"
}
11 changes: 11 additions & 0 deletions documentation/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Local postcss config, adjacent to package.json/node_modules so that
// postcss-load-config resolves plugins from the project's own
// node_modules/ and does not try to walk out of Hugo's module cache
// (which Node 24's permission model blocks).
//
// Mirrors Docsy 0.14's upstream postcss.config.js (autoprefixer only).
module.exports = {
plugins: {
autoprefixer: {},
},
};