You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doc Structure Lint uses a _local_ language model to evaluate some parts of your templates and content. This model only takes about 2 GB of storage, and it's only downloaded once. When you run the tool for the first time, it may take a few minutes to download the language model. If you don't want to download the model during installation, set the `DOC_STRUCTURE_LINT_PRELOAD` environment variable to `0`. However, if you specify an `instructions` property in your template, the model will be downloaded regardless of the `DOC_STRUCTURE_LINT_PRELOAD` variable value.
32
+
Doc Structure Lint uses a _local_ language model to evaluate the `instructions` rules of your templates. This model only takes about 2 GB of storage, and it's only downloaded once. The first time you run the tool with a template that uses `instructions`, it may take a few minutes to download the language model. If you want to preload the model during installation, set the `DOC_STRUCTURE_LINT_PRELOAD` environment variable to `1`.
-`--file-path` or `-f`: Path to the Markdown document to validate
41
-
-`--template-path` or `-p`: Path to the YAML template file (default: `./template.yaml`)
40
+
-`--file-path` or `-f`: URL or path to the content to lint. Local paths can be individual files or directories.
41
+
-`--template-path` or `-p`: URL or path to the template file (default: `./template.yaml`).
42
42
-`--template` or `-t`: Name of the template to use
43
43
-`--json`: Output results in JSON format
44
44
@@ -57,16 +57,16 @@ import { lintDocument } from "doc-structure-lint";
57
57
58
58
asyncfunctionvalidateDocument() {
59
59
constresult=awaitlintDocument({
60
-
file:"path/to/doc.md",
61
-
templatePath:"path/to/template.yaml",
62
-
template:"Template name",
60
+
file:"path/to/doc.md",// Path or URL. Doesn't support directories.
61
+
templatePath:"path/to/template.yaml",// Path or URL
62
+
template:"Template name",// Name of the template to use
63
63
});
64
64
}
65
65
```
66
66
67
67
## Template Format
68
68
69
-
Templates are defined in YAML and specify the structure and content requirements for your documents. Each template can contain multiple sections with various validation rules.
69
+
Templates are defined in YAML (as shown here) or JSON and specify the structure and content requirements for your documents. Each template can contain multiple sections with various validation rules.
70
70
71
71
Template definitions also support referencing with the `$ref` key, allowing you to reuse common section definitions across multiple templates.
0 commit comments