Repository navigation
feat: meta generator - #2711
feat: meta generator#2711Bojan Rajh (bojanrajh) wants to merge 5 commits into
Conversation
Developer Docs healthcheckStatus: Completed with |
There was a problem hiding this comment.
🟡 Changes recommended
The generator can silently overwrite article edits made during execution and mishandles empty frontmatter blocks, leaving delimiters that render as horizontal rules.
2 open issues
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
Adds an OpenAI-powered command to generate navigation titles and meta descriptions for Shopware documentation articles.
Changes:
- Adds article selection, missing-field backfills, dry-run previews, approval prompts, and token/cost reporting.
- Adds usage documentation, a pricing catalog, and automated tests.
- Adds required dependencies and aligns the development environment with Node.js 22.
| File | Description |
|---|---|
pnpm-lock.yaml |
Locks the generator’s dependencies |
package.json |
Adds dependencies, CLI/test commands, and Node.js requirement |
devenv.nix |
Updates the development runtime to Node.js 22 |
AGENTS.md |
Documents the updated Node.js environment |
.gitignore |
Excludes .env files from version control |
.github/scripts/README.md |
Documents setup, usage, approvals, and cost reporting |
.github/scripts/openai-pricing.json |
Defines model pricing for cost calculations |
.github/scripts/generate-seo-metadata.test.mjs |
Tests generation, validation, approvals, and failure handling |
.github/scripts/generate-seo-metadata.mjs |
Implements the metadata generation CLI |
Review effort: Balanced
| } | ||
|
|
||
| printActualUsage(io, actual); | ||
| for (const { item, metadata } of generated) { |
There was a problem hiding this comment.
There was a problem hiding this comment.
Not sure if this is applicable to us. If you're running the script, you aren't editing those files at the same time? Any reason to do so?
|
|
||
| export function parseArticle(source, relativePath = '<article>') { | ||
| const newline = source.includes('\r\n') ? '\r\n' : '\n'; | ||
| const match = source.match(/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/); |
|
Bojan Rajh (@bojanrajh) should we wait with the testing till the changes are applied from the CP review? We often get EU API keys from IT, which would fail on the README-documented execution
|
Micha Hobert (Isengo1989)
left a comment
There was a problem hiding this comment.
Error: 401 Attempted to access resource with incorrect regional hostname. Please make your request to eu.api.openai.com
Did you test with an personal openai API Key?
Micha Hobert (Isengo1989)
left a comment
There was a problem hiding this comment.
Bojan Rajh (@bojanrajh) if you got a international API Key for generating, please share it over 1PW 👍
# Conflicts: # devenv.nix # package.json
57d9154 to
2cbc653
Compare


Summary
Adds a command for generating meta titles and descriptions.
Related links
Checklist
PageRefreferences where relevant..gitbook.yamlif pages were moved, renamed, or deleted..wordlist.txt(and sorted it) if spellcheck flags new legitimate terms.Dependent PRs
Notes