From 062a7f738db474edfe5f35941c96a92674b7cd9d Mon Sep 17 00:00:00 2001 From: Sam Wright Date: Wed, 10 Apr 2024 18:10:41 -0700 Subject: [PATCH 01/11] No more in-page table of contents in blog posts --- .github/workflows/main.yml | 13 +++++++++++++ vale/WTD/contents.yml | 7 +++++++ vale/guide.ini | 2 ++ vale/news.ini | 6 ++++++ vale/vale.ini | 1 + 5 files changed, 29 insertions(+) create mode 100644 vale/WTD/contents.yml create mode 100644 vale/news.ini diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e31bb54d3..137d486d62 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,6 +48,19 @@ jobs: filter_mode: file version: 2.30.0 + - name: Vale Conf news Linter + uses: errata-ai/vale-action@reviewdog + env: + # Required, set by GitHub actions automatically: + # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + files: docs/conf/*/*/news + vale_flags: "--config=vale/news.ini" + reporter: github-pr-check + fail_on_error: true + filter_mode: file + version: 2.30.0 yaml-validate: runs-on: ubuntu-latest diff --git a/vale/WTD/contents.yml b/vale/WTD/contents.yml new file mode 100644 index 0000000000..d74f461300 --- /dev/null +++ b/vale/WTD/contents.yml @@ -0,0 +1,7 @@ +message: "Don't use in-page TOC in newsletter posts" +extends: existence +ignorecase: true +level: error +scope: raw +raw: + - 'contents::' diff --git a/vale/guide.ini b/vale/guide.ini index 17092c11bb..9ddb597da2 100644 --- a/vale/guide.ini +++ b/vale/guide.ini @@ -10,4 +10,6 @@ WTD.inclusivity-avoid = YES WTD.inclusivity = YES WTD.branding = YES +WTD.contents = NO + proselint.GenderBias = YES \ No newline at end of file diff --git a/vale/news.ini b/vale/news.ini new file mode 100644 index 0000000000..2e92ea85d6 --- /dev/null +++ b/vale/news.ini @@ -0,0 +1,6 @@ +StylesPath = . +MinAlertLevel = warning + +[*.rst] + +WTD.contents = YES diff --git a/vale/vale.ini b/vale/vale.ini index 7539df34fc..cc2b194515 100644 --- a/vale/vale.ini +++ b/vale/vale.ini @@ -5,6 +5,7 @@ MinAlertLevel = warning BasedOnStyles = WTD, proselint WTD.headings = NO +WTD.contents = NO # Initially, some proselint styles were included in vale. # In later vale versions, those were removed, so now we include From 89d3302d7f02477e5212e294f93bfb6c06929554 Mon Sep 17 00:00:00 2001 From: Sam Wright Date: Wed, 10 Apr 2024 18:20:31 -0700 Subject: [PATCH 02/11] Quote the wildcards --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 137d486d62..959fcc40d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,7 +55,7 @@ jobs: # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: - files: docs/conf/*/*/news + files: "docs/conf/*/*/news" vale_flags: "--config=vale/news.ini" reporter: github-pr-check fail_on_error: true From 476e4d6b293c1a657615d314ffd36fd09a577309 Mon Sep 17 00:00:00 2001 From: Aaron Collier Date: Thu, 9 May 2024 19:07:50 +0000 Subject: [PATCH 03/11] Try later Vale release --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f7e5131bc..2a2ae417ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,7 +60,7 @@ jobs: reporter: github-pr-check fail_on_error: true filter_mode: file - version: 2.30.0 + version: 3.4.2 yaml-validate: runs-on: ubuntu-latest From 1d0dbdb5c779c16d9248f7fa6642b7e0f7f1297f Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 10 May 2024 15:36:02 +0300 Subject: [PATCH 04/11] Update .github/workflows/main.yml Move files to vale config Co-authored-by: Aaron Collier --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a2ae417ce..ed90a716e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,8 +55,8 @@ jobs: # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: - files: "docs/conf/*/*/news" - vale_flags: "--config=vale/news.ini" + files: all + vale_flags: "--config=vale/news.ini --glob='docs/conf/**/news/*'" reporter: github-pr-check fail_on_error: true filter_mode: file From c1f6a78575d80bc412704f9157c2c4b6674092ac Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 14 May 2024 11:20:41 +0300 Subject: [PATCH 05/11] Update .github/workflows/main.yml Co-authored-by: Aaron Collier --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed90a716e6..2c864a12f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,7 +55,7 @@ jobs: # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: - files: all + files: docs vale_flags: "--config=vale/news.ini --glob='docs/conf/**/news/*'" reporter: github-pr-check fail_on_error: true From f86bb18da993c3e0ce8a87e9a67ba8385a6ad700 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 14 May 2024 12:17:08 +0300 Subject: [PATCH 06/11] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c864a12f6..06676f2900 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: files: docs - vale_flags: "--config=vale/news.ini --glob='docs/conf/**/news/*'" + vale_flags: "--config=vale/news.ini --glob='docs/conf/*/*/news/*'" reporter: github-pr-check fail_on_error: true filter_mode: file From 51e99d141a103daa11ac0475048e8a298b0df97c Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 14 May 2024 12:20:30 +0300 Subject: [PATCH 07/11] Apply suggestions from code review --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 06676f2900..2483b15220 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: vale_flags: "--config=vale/news.ini --glob='docs/conf/*/*/news/*'" reporter: github-pr-check fail_on_error: true - filter_mode: file + filter_mode: no_filter version: 3.4.2 yaml-validate: From 0134971c048fef67b456b19edcba11af79e6b3e2 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 14 May 2024 12:23:15 +0300 Subject: [PATCH 08/11] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2483b15220..e628c5ad5d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: vale_flags: "--config=vale/news.ini --glob='docs/conf/*/*/news/*'" reporter: github-pr-check fail_on_error: true - filter_mode: no_filter + filter_mode: nofilter version: 3.4.2 yaml-validate: From 7aafda793bb201bffed435ed41b1d7c6c8552b3f Mon Sep 17 00:00:00 2001 From: Aaron Collier Date: Tue, 14 May 2024 09:51:23 +0000 Subject: [PATCH 09/11] Test without quotes --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e628c5ad5d..88e9ad1535 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: files: docs - vale_flags: "--config=vale/news.ini --glob='docs/conf/*/*/news/*'" + vale_flags: "--config=vale/news.ini --glob=docs/conf/**/news/*" reporter: github-pr-check fail_on_error: true filter_mode: nofilter From 5c7d6c1c07d35fb248917ef6a41de7b6c8a2b71e Mon Sep 17 00:00:00 2001 From: Sam Wright Date: Tue, 14 May 2024 12:07:31 +0200 Subject: [PATCH 10/11] Make tests pass --- .../portland/2024/news/announcing-writing-day-projects.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/conf/portland/2024/news/announcing-writing-day-projects.rst b/docs/conf/portland/2024/news/announcing-writing-day-projects.rst index 77707f93b4..cdae248669 100644 --- a/docs/conf/portland/2024/news/announcing-writing-day-projects.rst +++ b/docs/conf/portland/2024/news/announcing-writing-day-projects.rst @@ -11,11 +11,7 @@ Who's ready for Writing Day?! I know of at least six project organizers who are Didn't have a moment to submit your project early? Fear not, you can `submit it at any time `__ between now and April 12 or you can bring it and submit it live during Writing Day. Day of project submissions are a time honored WTD tradition that we look forward to seeing continue. -Get excited, get delighted, and get ready to meet our first **Writing Day projects** for Write the Docs Portland 2024: - -.. contents:: - :depth: 2 - :local: +Get excited, get delighted, and get ready to meet our first **Writing Day projects** for Write the Docs Portland 2024. Docs as Tests & Doc Detective: Help us test your docs! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 8563a1e07a44dd002946f019441c9c3c8c6afb0c Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 14 May 2024 14:01:05 +0300 Subject: [PATCH 11/11] Update .github/workflows/main.yml Co-authored-by: Aaron Collier --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88e9ad1535..ab7359341d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: vale_flags: "--config=vale/news.ini --glob=docs/conf/**/news/*" reporter: github-pr-check fail_on_error: true - filter_mode: nofilter + filter_mode: file version: 3.4.2 yaml-validate: