Export Vocabularies in a Package #850
-
I am working on creating a custom Vale package for our organization. One area I'm a bit unclear on is if it's possible to also include a set of vocabularies. In the release notes for 3.0.0, I see a statement stating that all these folders support distribution through packages. However, in the main docs I am unable to find a clear example of how this would work. I tried adding
I've also tried:
But the above also fails because it's looking for it in |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Your package should look like this $ tree -a MyPackage
├── .vale.ini # You can include any config here, but at minimum it needs `StylesPath = styles`.
└── styles
├── MyStyle
│ └── MyRule.yml
└── config
└── vocabularies
└── MyVocab
├── accept.txt
└── reject.txt Then in the remote project's StylesPath = styles
Packages = MyPackage.zip
Vocab = MyVocab
[*.md]
BasedOnStyles = MyStyle |
Beta Was this translation helpful? Give feedback.
-
Hey @jdkato, thanks for the additional guidance. I am however, unable to trigger Vocabs failures. Here is my package structure:
The package
My remote project consumes the
Everything looks as expected, expect Vocab terms are not getting triggered. I am using version Here is the remote projects, Vale structure after
|
Beta Was this translation helpful? Give feedback.
-
You want this: StylesPath = vale/styles
MinAlertLevel = suggestion
Packages = https://github.com/spectrocloud/spectro-vale-pkg/releases/latest/download/spectrocloud-docs-internal.zip
# `Vocab` is a global setting
Vocab = spectrocloud-vocab
[*.md]
# The vocab rules, `Vale.Avoid` and `Vale.Terms`, require the `Vale` style to be enabled.
BasedOnStyles = Vale, spectrocloud-docs-internal |
Beta Was this translation helpful? Give feedback.
-
Thank you @jdkato that did the trick. If you want to, I'd be happy to open a docs PR and add an example to the package section. |
Beta Was this translation helpful? Give feedback.
You want this: