Skip to content

Commit

Permalink
No more in-page table of contents in blog posts (#2133)
Browse files Browse the repository at this point in the history
* No more in-page table of contents in blog posts

* Quote the wildcards

* Try later Vale release

* Update .github/workflows/main.yml

Move files to vale config

Co-authored-by: Aaron Collier <aaron@collier.cz>

* Update .github/workflows/main.yml

Co-authored-by: Aaron Collier <aaron@collier.cz>

* Update .github/workflows/main.yml

* Apply suggestions from code review

* Update .github/workflows/main.yml

* Test without quotes

* Make tests pass

* Update .github/workflows/main.yml

Co-authored-by: Aaron Collier <aaron@collier.cz>

---------

Co-authored-by: Aaron Collier <aaron@collier.cz>
  • Loading branch information
plaindocs and CollierCZ authored May 14, 2024
1 parent 053c86a commit def67ff
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ jobs:
filter_mode: file
version: 3.4.2

- 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
vale_flags: "--config=vale/news.ini --glob=docs/conf/**/news/*"
reporter: github-pr-check
fail_on_error: true
filter_mode: file
version: 3.4.2

yaml-validate:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.writethedocs.org/conf/portland/2024/writing-day/#call-for-project-submissions>`__ 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!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
7 changes: 7 additions & 0 deletions vale/WTD/contents.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
message: "Don't use in-page TOC in newsletter posts"
extends: existence
ignorecase: true
level: error
scope: raw
raw:
- 'contents::'
2 changes: 2 additions & 0 deletions vale/guide.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ WTD.inclusivity-avoid = YES
WTD.inclusivity = YES
WTD.branding = YES

WTD.contents = NO

proselint.GenderBias = YES
6 changes: 6 additions & 0 deletions vale/news.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
StylesPath = .
MinAlertLevel = warning

[*.rst]

WTD.contents = YES
1 change: 1 addition & 0 deletions vale/vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit def67ff

Please sign in to comment.