lopebase 0.6.5 → 0.6.6
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/README.md +29 -0
- package/dist/lopebase.js +566 -281
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -89,6 +89,35 @@ Made for web products, and fine with anything else:
|
|
|
89
89
|
| `npx lopebase mcp` | Run the LopeBase tools as a local MCP server (stdio) for any agent. |
|
|
90
90
|
| `npx lopebase adapter secret` | Print a new signing secret for [@lopebase/adapter](https://www.npmjs.com/package/@lopebase/adapter). Pipe it straight into your secret store. |
|
|
91
91
|
| `npx lopebase adapter check <url>` | Test a running adapter, local or deployed, before you connect it. |
|
|
92
|
+
| `npx lopebase blog check [dir]` | Check the blog posts LopeBase publishes to your repo. Exits 1 on any problem, for CI. `--format <preset>`, `--allow-empty`. |
|
|
93
|
+
|
|
94
|
+
## Check published blog posts in CI
|
|
95
|
+
|
|
96
|
+
When LopeBase publishes articles to your GitHub repo, add this to CI so a
|
|
97
|
+
malformed post fails the check instead of breaking your site build:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
npx lopebase blog check --format astro
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
It reads only the post files in one folder, with no network calls, and prints
|
|
104
|
+
one line per problem as `<file>: <problem>` plus a summary.
|
|
105
|
+
|
|
106
|
+
| Preset | Folder | File name |
|
|
107
|
+
| --- | --- | --- |
|
|
108
|
+
| `markdown` (default) | `content/blog` | `<slug>.md` |
|
|
109
|
+
| `next-mdx` | `content/blog` | `<slug>.mdx` |
|
|
110
|
+
| `astro` | `src/content/blog` | `<slug>.md` |
|
|
111
|
+
| `hugo` | `content/posts` | `<slug>.md` |
|
|
112
|
+
| `jekyll` | `_posts` | `YYYY-MM-DD-<slug>.md` |
|
|
113
|
+
|
|
114
|
+
Pass a folder to check somewhere else. For each post it checks the front
|
|
115
|
+
matter (required fields, quoted strings, dates, tag and image lists), that the
|
|
116
|
+
slug is lowercase words joined by hyphens and matches the file name, that the
|
|
117
|
+
body has at least one `##` heading, does not open with a `#` heading, and has
|
|
118
|
+
no raw HTML outside code, and that no two posts share a slug. A missing or
|
|
119
|
+
empty folder fails too, unless you pass `--allow-empty` (useful before the
|
|
120
|
+
first post lands).
|
|
92
121
|
|
|
93
122
|
## What it reads, and what it keeps
|
|
94
123
|
|