docmeta 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 docmeta contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # docmeta
2
+
3
+ Validate the **presence and format** of document metadata against **JSON Schema** — built for CI.
4
+
5
+ <!-- badges: add npm version, build status, and license badges here -->
6
+
7
+ `docmeta` checks the metadata in your documents — Markdown frontmatter and more — against one or more JSON Schemas. It verifies that required fields are present and correctly formatted (a `type`, an ISO 8601 `timestamp`, a URI `resource`); it does not judge prose quality. It ships with the [Open Knowledge Format (OKF)](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md) schema built in, follows [clig.dev](https://clig.dev) conventions, and returns a nonzero exit code (plus optional GitHub annotations) when validation fails.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install -g docmeta
13
+ # or run it without installing:
14
+ npx docmeta validate "**/*.md"
15
+ ```
16
+
17
+ Requires Node.js 24 or later.
18
+
19
+ ## Quick start
20
+
21
+ Point `docmeta validate` at a file, a directory (walked recursively), or a glob. With no `--schema`, it validates against the built-in OKF schema.
22
+
23
+ ```bash
24
+ docmeta validate docs/intro.md
25
+ ```
26
+
27
+ ```text
28
+ ✗ docs/intro.md
29
+ (root) must have required property 'type' (line 1) [google:okf:0.1]
30
+ /timestamp must match format "date-time" (line 9) [google:okf:0.1]
31
+
32
+ 1 file checked, 0 passed, 1 failed, 0 errors
33
+ ```
34
+
35
+ A clean run exits `0`; validation failures exit `1`; operational errors (no input, unknown schema, parse error) exit `2`.
36
+
37
+ ## Supported formats
38
+
39
+ Markdown, MDX, AsciiDoc, reStructuredText, XML, and HTML. Run `docmeta schemas` to list the built-in schemas and every supported format.
40
+
41
+ ## Documentation
42
+
43
+ Full guides, recipes, and reference live on the documentation site:
44
+
45
+ **https://hawkeyexl.github.io/docmeta/**
46
+
47
+ | Track | What it covers |
48
+ |-------|----------------|
49
+ | [Get started](https://hawkeyexl.github.io/docmeta/get-started/) | Install and run your first validation. |
50
+ | [Set up validation](https://hawkeyexl.github.io/docmeta/set-up/) | Stand up validation for a repo: `docmeta.config.yaml`, per-folder schema overrides. |
51
+ | [Run it in CI](https://hawkeyexl.github.io/docmeta/ci/) | GitHub Actions and other CI recipes, exit codes, and PR annotations. |
52
+ | [Define & evolve schemas](https://hawkeyexl.github.io/docmeta/schemas/) | Author a schema, wire up resolution, and version it without breaking the build. |
53
+ | [Reference](https://hawkeyexl.github.io/docmeta/reference/cli/) | Every CLI flag, config key, the schema-resolution precedence chain, and output formats. |
54
+
55
+ ## Contributing
56
+
57
+ Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for dev setup, the test loop, and how to add support for a new input format.
58
+
59
+ ## License
60
+
61
+ [MIT](LICENSE)