Skip to content

Conversation

@davidmerfield
Copy link
Owner

Summary

  • stop aliasing metadata during parsing and entry instantiation so stored metadata retains author-provided casing
  • apply metadata aliasing when augmenting entries for rendering so templates still work with lowercase lookups
  • update build, model, and render tests to reflect the new aliasing behavior and ensure serialization stays unchanged

Testing

  • not run (Docker-based test harness requires scripts/tests/test.env)

https://chatgpt.com/codex/tasks/task_e_6908a578e7888329a0be23b748ce58e1

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 138 to 144

if (key.slice(0, 4) === "<!--") {
key = key.slice(4).trim();
normalizedKey = key.toLowerCase();
}

if (value.slice(-3) === "-->") {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Dropping lowercase normalization breaks metadata consumers

The parser now stores metadata under the original key casing (metadata[key] = value) instead of lower‑casing keys, but aliasing is only applied in the render augment step. Earlier build steps still query lower‑case properties such as entry.metadata.page, draft, tags, etc. (see app/build/prepare/index.js), so a typical file containing Page: yes or Draft: yes will now leave entry.page, entry.draft, slug generation, and other logic unset because the lower‑case properties no longer exist. This causes pages, drafts, tag parsing, and permalink resolution to silently fail for any metadata written in mixed case. Consider re‑introducing aliasing (or converting to lower case) before build/prepare runs, or updating all consumers to the new casing.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants