Skip to content
Open
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
7 changes: 6 additions & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,9 @@ preserveTaxonomyNames = true

[[params.versions]]
name = "v1.7.0"
url = "/en/docs/v1-7-0"
url = "/en/docs/v1-7-0"

[markup]
[markup.highlight]
style = "github"
noClasses = true
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date = 2024-03-08
lastmod = 2024-03-08
datemonth = "Mar"
dateyear = "2024"
dateday = 08
dateday = 8

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/Volcano-1.11.0-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date = 2025-02-07
lastmod = 2025-02-07
datemonth = "Feb"
dateyear = "2025"
dateday = 07
dateday = 7

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date = 2025-04-01
lastmod = 2025-04-01
datemonth = "Apr"
dateyear = "2025"
dateday = 01
dateday = 1

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
Expand Down
2 changes: 1 addition & 1 deletion content/zh/blog/Quick-Start-Volcano.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date = 2019-03-28
lastmod = 2020-09-07
datemonth = "Sep"
dateyear = "2020"
dateday = 07
dateday = 7

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
Expand Down
4 changes: 2 additions & 2 deletions content/zh/blog/Volcano-1.11.0-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date = 2025-02-07
lastmod = 2025-02-07
datemonth = "Feb"
dateyear = "2025"
dateday = 07
dateday = 7

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
Expand Down Expand Up @@ -161,7 +161,7 @@ Volcano将持续优化网络拓扑感知调度功能,未来计划:

设计文档:**[Network Topology Aware Scheduling](https://volcano.sh/en/docs/network_topology_aware_scheduling/)**。

使用文档:**[Network Topology Aware Scheduling | Volcano](*https://volcano.sh/en/docs/network_topology_aware_scheduling/*)**。
使用文档:**[Network Topology Aware Scheduling | Volcano](https://volcano.sh/en/docs/network_topology_aware_scheduling/)**。

由衷感谢社区开发者: **@ecosysbin, @weapons97, @Xu-Wentao,@penggu, @JesseStutler, @Monokaix** 对该特性的贡献!

Expand Down
2 changes: 1 addition & 1 deletion content/zh/blog/kube-batch-customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date = 2019-01-28
lastmod = 2020-09-07
datemonth = "Sep"
dateyear = "2020"
dateday = 07
dateday = 7

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
Expand Down
2 changes: 1 addition & 1 deletion content/zh/blog/kube-batch-startup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date = 2019-01-28
lastmod = 2020-09-07
datemonth = "Sep"
dateyear = "2020"
dateday = 07
dateday = 7

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- <p class="powered-by"> -->
<!-- {{ with .Site.Copyright }}{{ . | markdownify}} {{ end }} -->
{{ if .IsHome }}
{{ if eq .Language.ContentDir "content/en"}}
{{ if eq .Language.Lang "en" }}
<div style="font-size: 18px;color: #fff;text-align: center;margin-top: 20px;">Volcano is a <a href="https://www.cncf.io/" style="color: #c8000b;">Cloud Native Computing Foundation</a> incubating project.</div>
<div style="margin: 52px 0 36px;">
<img src="/img/logo_cloudnative.png" alt="cloudnative logo" width="auto;" height="100px;" style="margin: 0 auto;">
Expand Down
10 changes: 5 additions & 5 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Source Themes Academic {{ .Site.Data.academic.version }}">
{{ .Hugo.Generator }}
{{ hugo.Generator }}

{{ $scr := .Scratch }}

Expand Down Expand Up @@ -131,10 +131,10 @@
{{ end }}
{{ end }}

{{ if or .Site.RSSLink .RSSLink }}
<link rel="alternate" href="{{ .RSSLink | default .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
<link rel="feed" href="{{ .RSSLink | default .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
{{ end }}
{{ with .OutputFormats.Get "rss" -}}
<link rel="alternate" href="{{ .Permalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
<link rel="feed" href="{{ .Permalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
{{ end -}}

{{ partial "favicons" . }}

Expand Down
6 changes: 3 additions & 3 deletions themes/academic/layouts/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
{{/* Correct the title and URL for author profile pages. */}}
{{- if eq .Section "author" -}}
{{- $title = .Params.name -}}
{{- $dir := path.Base (path.Split .Path).Dir -}}
{{- with $.Site.GetPage (printf "/authors/%s" (path.Base (path.Split .Path).Dir)) -}}
{{- $dir := path.Base (path.Split .File.Dir).Dir -}}
{{- with $.Site.GetPage (printf "/authors/%s" (path.Base (path.Split .File.Dir).Dir)) -}}
{{- $permalink = .Permalink -}}
{{- $rel_permalink = .RelPermalink -}}
{{- end -}}
Expand All @@ -54,7 +54,7 @@
{{- end -}}

{{- /* Add page to index. */ -}}
{{- $index = $index | append (dict "objectID" .UniqueID "date" .Date.UTC.Unix "publishdate" .PublishDate "lastmod" .Lastmod.UTC.Unix "expirydate" .ExpiryDate.UTC.Unix "lang" .Lang "permalink" $permalink "relpermalink" $rel_permalink "title" $title "summary" (plainify $desc) "content" .Plain "authors" $authors "kind" .Kind "type" .Type "section" .Section "tags" .Params.Tags "categories" .Params.Categories) -}}
{{- $index = $index | append (dict "objectID" (.RelPermalink | md5) "date" .Date.UTC.Unix "publishdate" .PublishDate "lastmod" .Lastmod.UTC.Unix "expirydate" .ExpiryDate.UTC.Unix "lang" .Lang "permalink" $permalink "relpermalink" $rel_permalink "title" $title "summary" (plainify $desc) "content" .Plain "authors" $authors "kind" .Kind "type" .Type "section" .Section "tags" .Params.Tags "categories" .Params.Categories) -}}

{{- end -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion themes/academic/layouts/partials/docs_sidebar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ $current_page := . }}
{{ $menu_name := (path.Base (path.Split .Path).Dir) }}
{{ $menu_name := .Section | default "docs" }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The change from directory-based menu naming to .Section introduces a regression for versioned documentation. In this project, different versions of documentation are stored in subdirectories (e.g., content/en/docs/v1-7-0/) and rely on the directory name to identify their specific menu (e.g., [[menu.v1-7-0]]). By forcing $menu_name to .Section ("docs"), all versions will now attempt to load the same "docs" menu, which will break the sidebar navigation for versioned content.

To maintain the original logic while avoiding the deprecated .Path variable, you should derive the menu name from the file's directory with a fallback to the section name.

Suggested change
{{ $menu_name := .Section | default "docs" }}
{{ $menu_name := .Section }}{{ with .File }}{{ $menu_name = path.Base .Dir }}{{ end }}

{{ with (index .Site.Menus $menu_name) }}
{{ else }}
{{ errorf "Please define menu items named `[menu.%s]` in your %s front matter or define `[[menu.%s]]` in `config.toml`." $menu_name .Path $menu_name }}
Expand Down
10 changes: 5 additions & 5 deletions themes/academic/layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Source Themes Academic {{ .Site.Data.academic.version }}">
{{ .Hugo.Generator }}
{{ hugo.Generator }}

{{ $scr := .Scratch }}

Expand Down Expand Up @@ -133,10 +133,10 @@
{{ end }}
{{ end }}

{{ if or .Site.RSSLink .RSSLink }}
<link rel="alternate" href="{{ .RSSLink | default .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
<link rel="feed" href="{{ .RSSLink | default .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
{{ end }}
{{ with .OutputFormats.Get "rss" -}}
<link rel="alternate" href="{{ .Permalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
<link rel="feed" href="{{ .Permalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
{{ end -}}

{{ partial "favicons" . }}

Expand Down
2 changes: 1 addition & 1 deletion themes/academic/layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<ul class="dropdown-menu">
{{ range .Translations }}
<li class="dropdown-item my-0 py-0 mx-0 px-0">
<a href="{{ .RelPermalink }}"{{ if $.IsHome }} data-target="{{ .URL }}"{{ end }}>
<a href="{{ .RelPermalink }}"{{ if $.IsHome }} data-target="{{ .RelPermalink }}"{{ end }}>
<span>{{ index .Site.Data.i18n.languages .Lang }}</span>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion themes/academic/layouts/partials/page_links_div.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{{ $slug := "" }}
{{ if eq $.File.TranslationBaseName "index" }}{{/* Check if using dir-based page bundles. */}}
{{ $slug = delimit (last 1 (split (substr $.Dir 0 -1) "/")) "" }}
{{ $slug = delimit (last 1 (split (substr $.File.Dir 0 -1) "/")) "" }}
{{ end }}
{{ $resource := $.Resources.GetMatch (printf "%s.pdf" $slug) }}
{{ with $resource }}
Expand Down
2 changes: 1 addition & 1 deletion themes/academic/layouts/partials/widget_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{{ if in (slice "slider") $widget }}
{{ partial $widget_path $params }}
{{ else }}
<section id="{{ $st.File.TranslationBaseName }}" class="home-section {{ printf "wg-%s" (replace $widget "_" "-") }} {{if $bg.text_color_light}}dark{{end}} {{if $bg.image}}parallax{{end}} {{ with $st.Params.advanced.css_class }}{{ . }}{{ end }}" {{with $style}}style="{{. | safeCSS}}"{{end}}>
<section id="{{ with $st.File }}{{ .TranslationBaseName }}{{ end }}" class="home-section {{ printf "wg-%s" (replace $widget "_" "-") }} {{if $bg.text_color_light}}dark{{end}} {{if $bg.image}}parallax{{end}} {{ with $st.Params.advanced.css_class }}{{ . }}{{ end }}" {{with $style}}style="{{. | safeCSS}}"{{end}}>
<div class="container">
{{ partial $widget_path $params }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/academic/layouts/partials/widgets/people.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2 class="mb-4">{{ . | markdownify }}</h2>
{{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }}
{{/* Get link to user's profile page. */}}
{{ $link := "" }}
{{ with $.Site.GetPage (printf "/authors/%s" (path.Base (path.Split .Path).Dir)) }}
{{ with $.Site.GetPage (printf "/authors/%s" (path.Base (path.Split .File.Dir).Dir)) }}
{{ $link = .RelPermalink }}
{{ end }}
<div class="col-12 col-sm-auto people-person">
Expand Down
2 changes: 1 addition & 1 deletion themes/academic/layouts/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<atom:link href="{{.URL}}" rel="self" type="application/rss+xml" />
<atom:link href="{{.Permalink}}" rel="self" type="application/rss+xml" />
{{ range first 15 (where .Data.Pages "Type" "!=" "home") }}
<item>
<title>{{ .Title }}</title>
Expand Down