Fix content-engine metadata copy#161
Merged
Merged
Conversation
Generate content-engine schema and directory indexes during the copy step so the source repo does not need root migration metadata files. Also unwrap hidden Markdown metadata only in the copied output and add missing hidden metadata for optional pages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repo’s “content-engine” export workflow by generating schema.json and index.yml during a new copy step, keeping frontmatter metadata hidden in GitHub-rendered Markdown while unwrapping it in copied output.
Changes:
- Adds a new
npm run copy:content-enginescript that copies the course subset, generatesschema.json/index.yml, unwraps hidden frontmatter, and validates copied Markdown. - Adds hidden frontmatter metadata blocks to appendices and an optional MCP page so they can be exported with required metadata.
- Removes the root-level
schema.jsonandindex.ymlfrom the source repo (now generated during the copy step).
Show a summary per file
| File | Description |
|---|---|
schema.json |
Removed from source repo (now generated during copy step). |
index.yml |
Removed from source repo (now generated during copy step). |
package.json |
Adds copy:content-engine npm script entry. |
appendices/README.md |
Adds hidden frontmatter for content-engine export. |
appendices/ci-cd-integration.md |
Adds hidden frontmatter for content-engine export. |
appendices/additional-context.md |
Adds hidden frontmatter for content-engine export. |
06-mcp-servers/mcp-custom-server.md |
Adds hidden frontmatter for content-engine export of optional page. |
.github/scripts/copy-content-engine-files.js |
New copy/export script that generates schema/index and validates output. |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 2
Comment on lines
+20
to
+23
| const sourceRoot = process.cwd(); | ||
| const destinationRoot = '/Users/danwahlin/Desktop/projects/cse-content-engine/content/learning-pathways/copilot-cli-for-beginners'; | ||
| const destinationParent = dirname(destinationRoot); | ||
| const contentEngineSchema = { |
Comment on lines
+93
to
+95
| if (resolvedDestination.startsWith(`${resolvedSource}/`)) { | ||
| fail('Destination cannot be inside the source repository.'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generate content-engine schema and index.yml files during the copy step