From e375865f8809d5f7c990e9cd639320e933ac8cdb Mon Sep 17 00:00:00 2001 From: Ken Payne Date: Fri, 21 Apr 2023 15:03:48 +0100 Subject: [PATCH 1/2] support subcategories --- Gemfile.lock | 3 ++ _layouts/page.html | 33 +++++++++++++++---- .../index.md} | 3 +- .../{ => dev-standards}/merge-process.md | 6 ++-- .../{ => dev-standards}/stable-increments.md | 1 + .../index.md} | 3 +- .../{ => team-practices}/outages.md | 1 + .../{ => team-practices}/release-process.md | 1 + .../sensitive-data-handling.md | 3 +- 9 files changed, 42 insertions(+), 12 deletions(-) rename src/_engineering/{dev-standards.md => dev-standards/index.md} (99%) rename src/_engineering/{ => dev-standards}/merge-process.md (98%) rename src/_engineering/{ => dev-standards}/stable-increments.md (99%) rename src/_engineering/{team-practices.md => team-practices/index.md} (99%) rename src/_engineering/{ => team-practices}/outages.md (99%) rename src/_engineering/{ => team-practices}/release-process.md (99%) rename src/_engineering/{ => team-practices}/sensitive-data-handling.md (98%) diff --git a/Gemfile.lock b/Gemfile.lock index 7500a6c..03e1398 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,6 +77,8 @@ GEM mercenary (0.4.0) nokogiri (1.12.5-arm64-darwin) racc (~> 1.4) + nokogiri (1.12.5-x86_64-darwin) + racc (~> 1.4) parallel (1.22.1) pathutil (0.16.2) forwardable-extended (~> 2.6) @@ -105,6 +107,7 @@ PLATFORMS arm64-darwin-20 arm64-darwin-21 arm64-darwin-22 + x86_64-darwin-22 DEPENDENCIES html-proofer (~> 3.19) diff --git a/_layouts/page.html b/_layouts/page.html index 36000c3..02af0dc 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -1,4 +1,3 @@ - @@ -21,19 +20,41 @@ {% else %} {% endif %} - {{ collection.name | capitalize }}

+ {% endif %} + + {% endif %} {% endfor %} {% endif %} diff --git a/src/_engineering/dev-standards.md b/src/_engineering/dev-standards/index.md similarity index 99% rename from src/_engineering/dev-standards.md rename to src/_engineering/dev-standards/index.md index 907a8f5..db3c061 100644 --- a/src/_engineering/dev-standards.md +++ b/src/_engineering/dev-standards/index.md @@ -1,7 +1,8 @@ --- layout: page title: Dev Standards -weight: 3 +weight: 1 +subcategory: Dev Standards --- This page is a resource for development standards across all Meltano products and Meltano code repos. diff --git a/src/_engineering/merge-process.md b/src/_engineering/dev-standards/merge-process.md similarity index 98% rename from src/_engineering/merge-process.md rename to src/_engineering/dev-standards/merge-process.md index b557ea4..6ae7813 100644 --- a/src/_engineering/merge-process.md +++ b/src/_engineering/dev-standards/merge-process.md @@ -2,6 +2,7 @@ layout: page title: Pull Request (PR) Process weight: 2 +subcategory: Dev Standards --- ## Trivial Updates @@ -11,7 +12,7 @@ A pull request that touches code is never trivial, but one that fixes a typo in Trivial updates, such as docs updates, do not require a logged issue. -Outside of very trivial issues like typo's, if a PR is opened *without* an associated issue, the PR description should then briefly explain why the PR is needed or what led to its creation. +Outside of very trivial issues like typo's, if a PR is opened _without_ an associated issue, the PR description should then briefly explain why the PR is needed or what led to its creation. ## PR Review Process @@ -61,8 +62,7 @@ Occasionally we need to help a contributor get their PR completed by contributin #### Step 1: Author must allow edits from maintainers -According to the [docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork -): +According to the [docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork): > Only pull request authors can give upstream repository maintainers, or those with push access to the upstream repository, permission to make commits to their pull request's compare branch in a user-owned fork. diff --git a/src/_engineering/stable-increments.md b/src/_engineering/dev-standards/stable-increments.md similarity index 99% rename from src/_engineering/stable-increments.md rename to src/_engineering/dev-standards/stable-increments.md index 365bebf..a60a53c 100644 --- a/src/_engineering/stable-increments.md +++ b/src/_engineering/dev-standards/stable-increments.md @@ -2,6 +2,7 @@ layout: page title: Stable Increments weight: 3 +subcategory: Dev Standards --- This page describes stable vs unstable increments, and is primarily focused on Engineering use cases and applications. diff --git a/src/_engineering/team-practices.md b/src/_engineering/team-practices/index.md similarity index 99% rename from src/_engineering/team-practices.md rename to src/_engineering/team-practices/index.md index 8f3f1bd..fe8af69 100644 --- a/src/_engineering/team-practices.md +++ b/src/_engineering/team-practices/index.md @@ -1,7 +1,8 @@ --- layout: page title: Team Practices -weight: 2 +weight: 1 +subcategory: Team Practices --- This page defines recurring practices which help the Engineering team to function effectively and efficiently. diff --git a/src/_engineering/outages.md b/src/_engineering/team-practices/outages.md similarity index 99% rename from src/_engineering/outages.md rename to src/_engineering/team-practices/outages.md index bbcc7be..74c7a02 100644 --- a/src/_engineering/outages.md +++ b/src/_engineering/team-practices/outages.md @@ -2,6 +2,7 @@ layout: page title: Outages and Escalation weight: 3 +subcategory: Team Practices --- ## Types of escalations diff --git a/src/_engineering/release-process.md b/src/_engineering/team-practices/release-process.md similarity index 99% rename from src/_engineering/release-process.md rename to src/_engineering/team-practices/release-process.md index fb0a1c7..270d79a 100644 --- a/src/_engineering/release-process.md +++ b/src/_engineering/team-practices/release-process.md @@ -2,6 +2,7 @@ layout: page title: Release Process weight: 2 +subcategory: Team Practices --- The process below applies to both Meltano and then SDK, unless otherwise noted. diff --git a/src/_engineering/sensitive-data-handling.md b/src/_engineering/team-practices/sensitive-data-handling.md similarity index 98% rename from src/_engineering/sensitive-data-handling.md rename to src/_engineering/team-practices/sensitive-data-handling.md index eb89532..bc519cf 100644 --- a/src/_engineering/sensitive-data-handling.md +++ b/src/_engineering/team-practices/sensitive-data-handling.md @@ -1,7 +1,8 @@ --- layout: page title: Handling of Sensitive Data -weight: 12 +weight: 3 +subcategory: Team Practices --- ## Data Classifications From c51fdd5c064927386652f810e56d2c4bebae6768 Mon Sep 17 00:00:00 2001 From: Ken Payne Date: Fri, 21 Apr 2023 15:32:32 +0100 Subject: [PATCH 2/2] remove dupe header if index is present --- _layouts/page.html | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/_layouts/page.html b/_layouts/page.html index 02af0dc..42dd0b4 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -37,21 +37,34 @@ {% assign num_subcategories = subcategories | size %} {% if num_subcategories > 0 %} {% for subcategory in subcategories %} -
  • - - - {{ subcategory }} - {% assign items = site[collection.label] | sort: "weight" | where: "subcategory", subcategory %} -
      + + + {% assign index_url = "#" %} {% for item in items %} -
    • - {{ item.title }} -
    • + {% assign page_name = item.url | split:"/" | last %} + {% if page_name == "index" %} + {% assign index_url = item.url %} + {% endif %} {% endfor %} -
    + +
  • + + + {{ subcategory }} + +
      + {% for item in items %} + {% unless item.url == index_url %} +
    • + {{ item.title }} +
    • + {% endunless %} + {% endfor %} +
    +
  • + {% endfor %%} - {% endif %}