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 vale rule to block use of site in local partials #425

Conversation

nfrankel
Copy link
Collaborator

@nfrankel nfrankel commented Jan 17, 2025

Content Description

Add vale rule to block use of site in local partials. Also fix existing partials to conform to the rule.

Didn't fix usage of fragments because there were too many existing violations.

We want to avoid using @site directive to reference docs specific _partials (references inside vcluster, platform or versioned folders).

To make this check automated, we would like to a create a vale rule to capture and enforce the logic.

Preview link

https://deploy-preview-425--vcluster-docs-site.netlify.app/docs/

Internal Reference

Closes DOC-287

Copy link

netlify bot commented Jan 17, 2025

Deploy Preview for vcluster-docs-site ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 050bff4
🔍 Latest deploy log https://app.netlify.com/sites/vcluster-docs-site/deploys/678a834f6b165600087c70c7
😎 Deploy Preview https://deploy-preview-425--vcluster-docs-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nfrankel nfrankel requested a review from Piotr1215 January 17, 2025 15:15
Copy link
Contributor

@Piotr1215 Piotr1215 left a comment

Choose a reason for hiding this comment

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

We should also add the same rule for the _fragments folders, as they are used with partials.

@site calls should be allowed for the docs folder in the repo root (which should already be ok with the rule):

.
├── get-started.mdx
├── index.mdx
└── _partials
    ├── kubeconfig_update.mdx
    └── managed_k8s_install_vcluster.mdx

1 directory, 4 files

It's good to test the rule in the vale studio and provide a sharable test result link in the PR.

  Also fix existing partials to conform to the rule
@nfrankel nfrankel force-pushed the doc-287/add-vale-rule-to-block-use-of-site-in-local-partials branch from f9137c5 to 050bff4 Compare January 17, 2025 16:20
Copy link
Contributor

@Piotr1215 Piotr1215 left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @nfrankel.

Adding vale studio tests: https://studio.vale.sh/s/f028e90494c82779de89c8acf28de041

image

@Piotr1215 Piotr1215 merged commit 0a2b21a into loft-sh:main Jan 23, 2025
7 checks passed
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