From 5ffc5a3ef2d7e2ec361dd98b9dd759204211ccba Mon Sep 17 00:00:00 2001 From: aniket866 Date: Sat, 1 Aug 2026 00:39:42 +0530 Subject: [PATCH 1/3] fixing-comma-handling-delimeter Signed-off-by: aniket866 --- themes/microcks/layouts/_default/index.json | 64 +++++++++---------- .../microcks/layouts/documentation/index.json | 64 +++++++++---------- 2 files changed, 60 insertions(+), 68 deletions(-) diff --git a/themes/microcks/layouts/_default/index.json b/themes/microcks/layouts/_default/index.json index 0f428763..54b754ce 100644 --- a/themes/microcks/layouts/_default/index.json +++ b/themes/microcks/layouts/_default/index.json @@ -1,36 +1,32 @@ -{{- $len := sub (len (.Pages.GroupBy "Section")) 1 -}} -[{{- range $item, $el := .Pages.GroupBy "Section" -}} -{{- range $i, $e := .Pages -}} -{{- if and (not .Params.ignoreSearch) (ne $e.Type "json") -}} - { - "section": "", - "url": "{{ $e.Permalink }}", - "title": "{{ with $e.Params.bannertext }}{{htmlEscape .}}{{else}}{{htmlEscape $e.Title}}{{end}}", - "description": "{{ htmlEscape .Description}}", - "searchKeyword": "{{ htmlEscape .Params.searchKeyword}}", - "content": {{$e.Plain | jsonify}} - }{{- if eq $item $len -}}{{- else -}},{{- end -}} -{{- end -}} - -{{- if .Section -}} -{{- $section := (where site.Pages "Section" .Section) | intersect (where site.Pages ".Title" "!=" .Title) -}} -{{- $sectionLen := len (where site.Pages "Section" .Section) -}} -{{- $sectionLenTotal := sub $sectionLen 2 -}} - -{{- range $index, $page := $section -}} -{{- if and (not .Params.ignoreSearch) (ne $page.Type "json") -}} - { - "section": "{{$page.Section | humanize}}", - "url": "{{ $page.Permalink }}", - "title": "{{ with $page.Params.bannertext }}{{htmlEscape .}}{{else}}{{htmlEscape $page.Title}}{{end}}", - "description": "{{ htmlEscape .Description}}", - "searchKeyword": "{{ htmlEscape .Params.searchKeyword}}", - "content": {{$page.Plain | jsonify}} - }{{- if eq $item $len -}}{{- if ne $index $sectionLenTotal -}},{{- end -}}{{- else -}},{{- end -}} -{{- end -}} -{{- end -}} - -{{- end -}} +{{- $.Scratch.Delete "search_index" -}} +{{- range $item, $el := .Pages.GroupBy "Section" -}} + {{- range $i, $e := .Pages -}} + {{- if and (not $e.Params.ignoreSearch) (ne $e.Type "json") -}} + {{- $title := $e.Title -}} + {{- if $e.Params.bannertext -}} + {{- $title = $e.Params.bannertext -}} + {{- end -}} + {{- $entry := dict "section" "" "url" $e.Permalink "title" (htmlEscape $title) "description" (htmlEscape $e.Description) "searchKeyword" (htmlEscape $e.Params.searchKeyword) "content" $e.Plain -}} + {{- $.Scratch.Add "search_index" (slice $entry) -}} + {{- end -}} + {{- end -}} + {{- if .Section -}} + {{- $section := (where site.Pages "Section" .Section) | intersect (where site.Pages ".Title" "!=" .Title) -}} + {{- range $index, $page := $section -}} + {{- if and (not $page.Params.ignoreSearch) (ne $page.Type "json") -}} + {{- $title := $page.Title -}} + {{- if $page.Params.bannertext -}} + {{- $title = $page.Params.bannertext -}} + {{- end -}} + {{- $entry := dict "section" ($page.Section | humanize) "url" $page.Permalink "title" (htmlEscape $title) "description" (htmlEscape $page.Description) "searchKeyword" (htmlEscape $page.Params.searchKeyword) "content" $page.Plain -}} + {{- $.Scratch.Add "search_index" (slice $entry) -}} + {{- end -}} + {{- end -}} + {{- end -}} {{- end -}} -{{- end -}}] \ No newline at end of file +{{- with $.Scratch.Get "search_index" -}} + {{- . | jsonify -}} +{{- else -}} + [] +{{- end -}} \ No newline at end of file diff --git a/themes/microcks/layouts/documentation/index.json b/themes/microcks/layouts/documentation/index.json index 25fe5c79..54b754ce 100644 --- a/themes/microcks/layouts/documentation/index.json +++ b/themes/microcks/layouts/documentation/index.json @@ -1,36 +1,32 @@ -{{- $len := sub (len (.Pages.GroupBy "Section")) 1 -}} -[{{- range $item, $el := .Pages.GroupBy "Section" -}} -{{- range $i, $e := .Pages -}} -{{- if and (not .Params.ignoreSearch) (ne $e.Type "json") -}} - { - "section": "", - "url": "{{ $e.Permalink }}", - "title": "{{ with $e.Params.bannertext }}{{htmlEscape .}}{{else}}{{htmlEscape $e.Title}}{{end}}", - "description": "{{ htmlEscape .Description}}", - "searchKeyword": "{{ htmlEscape .Params.searchKeyword}}", - "content": {{$e.Plain | jsonify}} - }, -{{- end -}} - -{{- if .Section -}} -{{- $section := (where site.Pages "Section" .Section) | intersect (where site.Pages ".Title" "!=" .Title) -}} -{{- $sectionLen := len (where site.Pages "Section" .Section) -}} -{{- $sectionLenTotal := sub $sectionLen 2 -}} - -{{- range $index, $page := $section -}} -{{- if and (not .Params.ignoreSearch) (ne $page.Type "json") -}} - { - "section": "{{$page.Section | humanize}}", - "url": "{{ $page.Permalink }}", - "title": "{{ with $page.Params.bannertext }}{{htmlEscape .}}{{else}}{{htmlEscape $page.Title}}{{end}}", - "description": "{{ htmlEscape .Description}}", - "searchKeyword": "{{ htmlEscape .Params.searchKeyword}}", - "content": {{$page.Plain | jsonify}} - }{{- if eq $item $len -}}{{- if ne $index $sectionLenTotal -}},{{- end -}}{{- else -}},{{- end -}} -{{- end -}} -{{- end -}} - -{{- end -}} +{{- $.Scratch.Delete "search_index" -}} +{{- range $item, $el := .Pages.GroupBy "Section" -}} + {{- range $i, $e := .Pages -}} + {{- if and (not $e.Params.ignoreSearch) (ne $e.Type "json") -}} + {{- $title := $e.Title -}} + {{- if $e.Params.bannertext -}} + {{- $title = $e.Params.bannertext -}} + {{- end -}} + {{- $entry := dict "section" "" "url" $e.Permalink "title" (htmlEscape $title) "description" (htmlEscape $e.Description) "searchKeyword" (htmlEscape $e.Params.searchKeyword) "content" $e.Plain -}} + {{- $.Scratch.Add "search_index" (slice $entry) -}} + {{- end -}} + {{- end -}} + {{- if .Section -}} + {{- $section := (where site.Pages "Section" .Section) | intersect (where site.Pages ".Title" "!=" .Title) -}} + {{- range $index, $page := $section -}} + {{- if and (not $page.Params.ignoreSearch) (ne $page.Type "json") -}} + {{- $title := $page.Title -}} + {{- if $page.Params.bannertext -}} + {{- $title = $page.Params.bannertext -}} + {{- end -}} + {{- $entry := dict "section" ($page.Section | humanize) "url" $page.Permalink "title" (htmlEscape $title) "description" (htmlEscape $page.Description) "searchKeyword" (htmlEscape $page.Params.searchKeyword) "content" $page.Plain -}} + {{- $.Scratch.Add "search_index" (slice $entry) -}} + {{- end -}} + {{- end -}} + {{- end -}} {{- end -}} -{{- end -}}] \ No newline at end of file +{{- with $.Scratch.Get "search_index" -}} + {{- . | jsonify -}} +{{- else -}} + [] +{{- end -}} \ No newline at end of file From ce6d430fa305022909c33004c72916b1600b81ac Mon Sep 17 00:00:00 2001 From: aniket866 Date: Sat, 1 Aug 2026 00:54:34 +0530 Subject: [PATCH 2/3] fix-Masonry Signed-off-by: aniket866 --- themes/microcks/assets/js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/microcks/assets/js/script.js b/themes/microcks/assets/js/script.js index c32615b8..79a8ebe9 100644 --- a/themes/microcks/assets/js/script.js +++ b/themes/microcks/assets/js/script.js @@ -180,7 +180,7 @@ window.onscroll = function () { window.onload = function () { let masonryWrapper = document.querySelector('.masonry-wrapper'); // if masonryWrapper is not null, then initialize masonry - if (masonryWrapper) { + if (masonryWrapper && typeof Masonry !== 'undefined') { let masonry = new Masonry(masonryWrapper, { columnWidth: 1 }); From 601e18e5246ba89c6df687aea0e50bee54494e69 Mon Sep 17 00:00:00 2001 From: aniket866 Date: Sat, 1 Aug 2026 00:59:43 +0530 Subject: [PATCH 3/3] fix/copyright-year Signed-off-by: aniket866 --- config/_default/params.toml | 2 +- themes/microcks/layouts/partials/footer.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index 0fb4b228..04682387 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -37,7 +37,7 @@ table_of_content = true # copyright theme_copyright = false -copyright = "The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see [**Trademark Usage**.](https://www.linuxfoundation.org/legal/trademark-usage)
**Microcks** is a [**Cloud Native Computing Incubating**](https://landscape.cncf.io/?selected=microcks&item=app-definition-and-development--application-definition-image-build--microcks) project 🚀" +copyright = "Copyright © {year} The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see [**Trademark Usage**.](https://www.linuxfoundation.org/legal/trademark-usage)
**Microcks** is a [**Cloud Native Computing Incubating**](https://landscape.cncf.io/?selected=microcks&item=app-definition-and-development--application-definition-image-build--microcks) project 🚀" # Preloader [preloader] diff --git a/themes/microcks/layouts/partials/footer.html b/themes/microcks/layouts/partials/footer.html index b3ddde40..30e311a2 100644 --- a/themes/microcks/layouts/partials/footer.html +++ b/themes/microcks/layouts/partials/footer.html @@ -59,7 +59,7 @@
- {{ site.Params.Copyright | markdownify }} + {{ replace site.Params.Copyright "{year}" (now.Format "2006") | markdownify }}