Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add minimal Vale configuration, existing package files #220

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ADubhlaoich
Copy link
Contributor

Proposed changes

This pull request adds a new minimal Vale configuration, as well as some package files from a prior iteration of a style guide for NGINX/F5. There is a lot of nuance to how Vale can be configured: the intent of adding these files is so that we can begin to iterate on what to override, add or disable alongside style guide work.

Checklist

Before merging a pull request, run through this checklist and mark each as complete.

  • I have read the contributing guidelines
  • I have signed the F5 Contributor License Agreement (CLA)
  • I have rebased my branch onto main
  • I have ensured my PR is targeting the main branch and pulling from my branch from my own fork
  • I have ensured that the commit messages adhere to Conventional Commits
  • I have ensured that documentation content adheres to the style guide
  • If the change involves potentially sensitive changes1, I have assessed the possible impact
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • I have ensured that existing tests pass after adding my changes
  • If applicable, I have updated README.md and CHANGELOG.md

Footnotes

  1. Potentially sensitive changes include anything involving code, personally identify information (PII), live URLs or significant amounts of new or revised documentation. Please refer to our style guide for guidance about placeholder content.

This commit adds a new minimal Vale configuration, as well as some
package files from a prior iteration of a style guide for NGINX/Vale.
There is a lot of nuance to how Vale can be configured: the intent of
adding these files is so that we can begin to iterate on what to
override, add or disable alongside style guide work.
@ADubhlaoich ADubhlaoich requested a review from a team as a code owner February 21, 2025 16:56
Copy link

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/docs/220/

@ADubhlaoich ADubhlaoich marked this pull request as draft February 21, 2025 17:01
@ADubhlaoich ADubhlaoich removed the request for review from a team February 21, 2025 17:01
@ADubhlaoich
Copy link
Contributor Author

I'm testing Vale against some NGINX Gateway Fabric pages while I figure out what the good, contemporary way to configure Vale is.

Although anyone reading this PR for the first time has no context about it, the old Vale configuration file had some precise overrides for Microsoft styles that we didn't always have a cascade for, and there were a lot of precise patterns for ignores in Markdown files that are now managed by the Hugo package.


[*.{md}]

BasedOnStyles = Vale, Microsoft, NGINX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you've included NGINX Acronyms.yml

Partially as a test, I set this up to avoid the rules associated with https://github.com/errata-ai/Microsoft/blob/master/Microsoft/Acronyms.yml

Suggested change
BasedOnStyles = Vale, Microsoft, NGINX
BasedOnStyles = Vale, Microsoft, NGINX
# Style.Rule = {YES, NO, suggestion, warning, error} to
# enable/disable a rule or change its level.
Microsoft.Acronyms = NO

With this modification, I avoided this error message:

$ vale sync
$ vale content/nginx-one/getting-started.md 

 content/nginx-one/getting-started.md
 10:89    suggestion  'NGINX' has no definition.      Microsoft.Acronyms   

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the value in re-documenting how Vale works.

I am going through active testing and adjustment of the rules: this PR is in a draft state while I do so, and as such, I am not accepting edit suggestions.

Copy link
Contributor

@mjang mjang Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm suggesting that we follow good coding practice. IOW, add comments that explain what's happening with the code.

this PR is in a draft state while I do so, and as such, I am not accepting edit suggestions.

Now you know what I'm looking for once you're ready to take this PR out of draft state. And even more, with this comment, I can remember what I think is needed when this PR is ready for review.

@@ -0,0 +1,8 @@
StylesPath = styles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want it clear that this is a PoC for now....

Suggested change
StylesPath = styles
# This is a PoC, until we have a configuration that matches our style guide at
# https://github.com/nginx/documentation/blob/main/templates/style-guide.md
StylesPath = styles

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the PR being in a draft state not create sufficient enough barrier to entry?

Someone would have to check out the branch to attempt to use it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I don't understand your approach to this PR / change. Once it's taken out of draft, reviewed, and merged, I'm thinking this will be a PoC for a while -- until we're able to test this on a number of NGINX docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't intend to swap this to a review state until it's been tested across multiple documentation sets, and even then, it's an optional artifact for people to interact with until it's enforced as a requirement by both consensus and CI tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants