writethedocs / www

The main website for Write the Docs.
http://www.writethedocs.org
Other
1.32k stars 510 forks source link

No more in-page table of contents in blog posts #2133

Closed plaindocs closed 4 months ago

plaindocs commented 5 months ago

Which admittedly, is mostly me protecting me from myself.

These don't work when posts get mailed out, so let's make sure we don't use them.

This adds a new Vale config (and edits the existing two to tell them not use the new rule)


📚 Documentation preview 📚: https://writethedocs-www--2133.org.readthedocs.build/

plaindocs commented 5 months ago

Oh how tedious, looks like you can't wildcard

Opened an issue in https://github.com/errata-ai/vale-action/issues/123

CollierCZ commented 4 months ago

The issue is definitely in the GitHub action. Opened https://github.com/errata-ai/vale-action/pull/125, which might help.

plaindocs commented 4 months ago

Ooh nice! You closed it though?

plaindocs commented 4 months ago

OK, so that works locally

❯ vale --config=vale/news.ini --glob='docs/conf/**/news/*' *

 docs/conf/portland/2024/news/announcing-writing-day-projects.rst
 16:4  error  Don't use in-page TOC in        WTD.contents 
              newsletter posts                             

✖ 1 error, 0 warnings and 0 suggestions in 180 files.

And the actions is calling vale --output=/home/runner/work/_actions/errata-ai/vale-action/reviewdog/lib/rdjsonl.tmpl --config=vale/news.ini --glob='docs/conf/**/news/*' . over in https://github.com/writethedocs/www/actions/runs/9032315561/job/24820266130?pr=2133#step:5:40

And the . doesn't work locally where there * does :-D

wtd on  no-more-contents [$] via 🐍 v3.12.3 took 27s 
❯ vale --config=vale/news.ini --glob='docs/conf/**/news/*' .
stat .venv/bin/python: no such file or directory

wtd on  no-more-contents [$] via 🐍 v3.12.3 took 49s 
❯ vale --config=vale/news.ini --glob='docs/conf/**/news/*' *

 docs/conf/portland/2024/news/announcing-writing-day-projects.rst
 16:4  error  Don't use in-page TOC in        WTD.contents 
              newsletter posts                             

✖ 1 error, 0 warnings and 0 suggestions in 180 files.
CollierCZ commented 4 months ago

Both * and . work on the Mac I'm currently using. I'd guess that might not be fully OS-independent. Maybe if we try specifying a folder.

CollierCZ commented 4 months ago

Ah, that was it. Removing the quotes, as suggested in https://github.com/errata-ai/vale-action/pull/83

plaindocs commented 4 months ago

Quite the adventure!