From c7bbf5d57e96a42695c1425b9b0c0b921d73a914 Mon Sep 17 00:00:00 2001 From: anopsy Date: Tue, 18 Feb 2025 08:44:07 +0100 Subject: [PATCH] updating version-adding nav --- .ruby-version | 2 +- Gemfile | 10 +- Gemfile.lock | 84 +++-- _data/nav.yml | 4 +- _includes/components/breadcrumbs.html | 96 ------ _includes/components/children_nav.html | 36 -- _includes/nav.html | 76 ++-- css/activation.scss.liquid | 325 ------------------ data-testing/data-testing.md | 1 + index.html | 1 + observability/observability.md | 1 + overview/data-testing.md | 1 + .../soda-cloud-administration.md | 1 + soda/get-started-roadmap.md | 1 + 14 files changed, 113 insertions(+), 526 deletions(-) delete mode 100644 _includes/components/breadcrumbs.html delete mode 100644 _includes/components/children_nav.html delete mode 100644 css/activation.scss.liquid diff --git a/.ruby-version b/.ruby-version index a4dd9dba..47b322c9 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.4 +3.4.1 diff --git a/Gemfile b/Gemfile index 3ff3ae06..b7aab331 100644 --- a/Gemfile +++ b/Gemfile @@ -28,4 +28,12 @@ gem "webrick" gem 'jekyll-redirect-from' -gem 'jekyll-sitemap' \ No newline at end of file +gem 'jekyll-sitemap' + +gem 'csv' + +gem 'logger' + +gem 'base64' + +gem 'bigdecimal' diff --git a/Gemfile.lock b/Gemfile.lock index 4caa4632..95a4f588 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,20 +1,33 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + base64 (0.2.0) + bigdecimal (3.1.9) colorator (1.1.0) - concurrent-ruby (1.1.9) + concurrent-ruby (1.3.5) + csv (3.3.2) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) eventmachine (1.2.7) - ffi (1.15.5) + ffi (1.17.1) + ffi (1.17.1-aarch64-linux-gnu) + ffi (1.17.1-aarch64-linux-musl) + ffi (1.17.1-arm-linux-gnu) + ffi (1.17.1-arm-linux-musl) + ffi (1.17.1-arm64-darwin) + ffi (1.17.1-x86-linux-gnu) + ffi (1.17.1-x86-linux-musl) + ffi (1.17.1-x86_64-darwin) + ffi (1.17.1-x86_64-linux-gnu) + ffi (1.17.1-x86_64-linux-musl) forwardable-extended (2.6.0) http_parser.rb (0.8.0) - i18n (1.8.11) + i18n (1.14.7) concurrent-ruby (~> 1.0) - jekyll (4.2.1) + jekyll (4.2.2) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -29,67 +42,80 @@ GEM rouge (~> 3.0) safe_yaml (~> 1.0) terminal-table (~> 2.0) - jekyll-feed (0.16.0) + jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) - jekyll-last-modified-at (1.3.0) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-last-modified-at (1.3.2) jekyll (>= 3.7, < 5.0) - posix-spawn (~> 0.3.9) jekyll-redirect-from (0.16.0) jekyll (>= 3.3, < 5.0) - jekyll-sass-converter (2.1.0) + jekyll-sass-converter (2.2.0) sassc (> 2.0.1, < 3.0) - jekyll-seo-tag (2.7.1) + jekyll-seo-tag (2.8.0) jekyll (>= 3.8, < 5.0) jekyll-sitemap (1.4.0) jekyll (>= 3.7, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - just-the-docs (0.3.3) + just-the-docs (0.10.1) jekyll (>= 3.8.5) - jekyll-seo-tag (~> 2.0) - rake (>= 12.3.1, < 13.1.0) - kramdown (2.3.1) - rexml + jekyll-include-cache + jekyll-seo-tag (>= 2.0) + rake (>= 12.3.1) + kramdown (2.5.1) + rexml (>= 3.3.9) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.4) - listen (3.7.0) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.6) mercenary (0.4.0) pathutil (0.16.2) forwardable-extended (~> 2.6) - posix-spawn (0.3.15) - public_suffix (4.0.6) - rake (13.0.6) - rb-fsevent (0.11.0) - rb-inotify (0.10.1) + public_suffix (6.0.1) + rake (13.2.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.3.6) - strscan - rouge (3.27.0) + rexml (3.4.1) + rouge (3.30.0) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) - strscan (3.1.0) terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) unicode-display_width (1.8.0) - webrick (1.8.2) + webrick (1.9.1) PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin ruby - x86_64-darwin-16 + x86-linux-gnu + x86-linux-musl + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES + base64 + bigdecimal + csv jekyll (~> 4.2.0) jekyll-feed (~> 0.12) jekyll-last-modified-at jekyll-redirect-from jekyll-sitemap just-the-docs + logger wdm (~> 0.1.1) webrick BUNDLED WITH - 2.2.27 + 2.6.4 diff --git a/_data/nav.yml b/_data/nav.yml index 88b792b5..cb99956b 100644 --- a/_data/nav.yml +++ b/_data/nav.yml @@ -70,10 +70,10 @@ - title: Observability page: observability/observability.md - children: + subcategories: - subtitle: Introduction page: observability/introduction.md - children: + subcategories: - subtitle: What is observability page: observability/what-is-observability.md - subtitle: What is metrics monitoring diff --git a/_includes/components/breadcrumbs.html b/_includes/components/breadcrumbs.html deleted file mode 100644 index 9fa70f00..00000000 --- a/_includes/components/breadcrumbs.html +++ /dev/null @@ -1,96 +0,0 @@ -{%- comment -%} - Include as: {%- include components/breadcrumbs.html -%} - Depends on: page, site. - Includes: components/site_nav.html. - Results in: HTML for the breadcrumbs component. - Overwrites: - nav_list_link, site_nav, nav_list_simple, nav_list_link_class, nav_category, - nav_anchor_splits, nav_breadcrumbs, nav_split, nav_split_next, nav_split_test, - nav_breadcrumb_link, nav_list_end_less, nav_list_end_count, nav_end_index, nav_breadcrumb. -{%- endcomment -%} - -{%- if page.url != "/" and page.parent and page.title -%} - -{%- capture site_nav -%} -{%- include_cached components/site_nav.html all=true -%} -{%- endcapture -%} - -{%- capture nav_list_link -%} - -{%- endcapture -%} - -{%- capture nav_list_simple -%} -"s requires that number - of potential ancestors to be popped from the stack. - - The number of occurrences of a string in nav_split_next is computed by removing - them all, then dividing the resulting size difference by the length of the string. -{%- endcomment %} - -{%- assign nav_breadcrumbs = "" | split: "" -%} - -{%- for nav_split in nav_anchor_splits -%} -{%- unless forloop.last -%} - -{%- assign nav_split_next = nav_anchor_splits[forloop.index] | strip -%} - -{%- assign nav_split_test = - nav_split_next | remove_first: nav_list_simple | prepend: nav_list_simple -%} -{%- if nav_split_test == nav_split_next -%} - {%- assign nav_breadcrumb_link = - nav_split | split: "" | append: "" -%} - {%- assign nav_breadcrumbs = nav_breadcrumbs | push: nav_breadcrumb_link -%} -{%- endif -%} - -{%- if nav_split_next contains "" -%} - {%- assign nav_list_end_less = nav_split_next | remove: "" -%} - {%- assign nav_list_end_count = - nav_split_next.size | minus: nav_list_end_less.size | divided_by: 5 -%} - {% for nav_end_index in (1..nav_list_end_count) %} - {%- assign nav_breadcrumbs = nav_breadcrumbs | pop -%} - {%- endfor -%} -{%- endif -%} - -{%- endunless -%} -{%- endfor -%} - - - -{% if site.nav_error_report %} -{{ nav_error_report }} -{% endif %} - -{%- endif -%} \ No newline at end of file diff --git a/_includes/components/children_nav.html b/_includes/components/children_nav.html deleted file mode 100644 index 5095371f..00000000 --- a/_includes/components/children_nav.html +++ /dev/null @@ -1,36 +0,0 @@ -{%- comment -%} - Updated to support both `children` and `subcategories` for flexible YAML structures. -{%- endcomment -%} -{%- if page.has_children == false and page.subcategories == nil -%} - {%- assign nav_children = "" | split: "" -%} -{%- else -%} - {%- capture site_nav -%} - {%- include_cached components/site_nav.html all=true -%} - {%- endcapture -%} - {%- assign nav_children = site_nav | where_exp: "item", "item.parent == page.url" | concat: page.subcategories -%} -{%- endif -%} -{%- unless nav_children == empty -%} - {%- assign nav_ancestors = "" | split: "" -%} - {%- for nav_link in nav_breadcrumbs -%} - {%- assign nav_title = nav_link | split: ">" | slice: 1 | first | append: ">" | remove: "" -%} - {%- assign nav_ancestors = nav_ancestors | push: nav_title -%} - {%- endfor -%} - {%- assign nav_parenthood = site[page.collection] | default: site.html_pages | where_exp: "item", "item.title != nil" | group_by: "parent" -%} - {%- assign nav_top_nodes = nav_parenthood | where_exp: "item", "item.name == ''" | map: "items" | first -%} - {%- assign nav_top_node_titles = nav_top_nodes | map: "title" -%} - {%- include components/nav/children.html node=page ancestors=nav_ancestors all=true -%} -{%- endunless -%} -{%- if nav_children.size >= 1 -%} - {%- if page.child_nav_order == 'desc' or page.child_nav_order == 'reversed' -%} - {%- assign nav_children = nav_children | reverse -%} - {%- endif -%} -
-{% include toc_heading_custom.html %} - -{%- endif -%} \ No newline at end of file diff --git a/_includes/nav.html b/_includes/nav.html index 896a5f07..5dfcdeb9 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -6,48 +6,52 @@ {% else %} {% assign navlist = site.data.nav %} {% endif %} + + {% for nav in navlist %} {% if nav.subcategories != null %} - {% assign current_parent = nav.subcategories | where:"page", page.path | size %} - {% if current_parent != 0 %} - {% assign classlist = "active" %} + {% assign current_parent = nav.subcategories | where:"page", page.path | size %} + {% if current_parent != 0 %} + {% assign classlist = "active" %} + {% else %} + {% assign classlist = "" %} + {% endif %} + {% else %} - {% if page.path == nav.page %} - {% assign classlist = "active" %} - {% else %} - {% assign classlist = "" %} - {% endif %} - + {% if page.path == nav.page %} + {% assign classlist = "active" %} + {% else %} + {% assign classlist = "" %} + {% endif %} + {% endif %} {% endfor %} - - + \ No newline at end of file diff --git a/css/activation.scss.liquid b/css/activation.scss.liquid deleted file mode 100644 index 8d2a4a7a..00000000 --- a/css/activation.scss.liquid +++ /dev/null @@ -1,325 +0,0 @@ -{%- comment -%} - Include as: {%- include css/activation.scss.liquid -%} - Depends on: page. - Results in: page-dependent CSS rules for inclusion in a style element, - which needs to be disabled when JS is enabled. - Includes: components/site_nav.html. - Overwrites: - activation_no_nav_link, nav_list_link, site_nav, - nav_list, nav_list_end, nav_list_item, nav_category_list, - nav_list_link_prefix, nav_splits, nav_split, nav_levels, - nav_list_less, nav_list_count, nav_end_less, nav_end_count, - nav_index, nav_slice_size, - activation_collection_prefix, activation_other_collection_prefix. - Should not be cached, because it depends on page. -{%- endcomment -%} - -{%- comment -%} - The CSS rules in activation_no_nav_link are for use on pages excluded from the main navigation. - - The first rule ensures that no nav-link has a background image. - - The other two rules ensure that all folding collections are expanded. -{%- endcomment -%} - -{%- capture site_nav -%} -{%- include_cached components/site_nav.html -%} -{%- endcapture -%} - -{%- capture activation_no_nav_link %} - .site-nav ul li a { - background-image: none; - } - - {%- if site.just_the_docs.collections %} - .site-nav > ul.nav-category-list > li > button svg { - transform: rotate(-90deg); - } - .site-nav > ul.nav-category-list > li.nav-list-item > ul.nav-list { - display: block; - } - {%- endif %} -{% endcapture -%} - -{%- capture nav_list_link -%} - -{%- endcapture -%} - -{%- if site_nav contains nav_list_link -%} - - {%- capture nav_list -%} -