mdx-editor / mdx-editor/editor

support objects in frontmatter

Open
#19 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request/enhancement
Dominant language
TypeScript
Stars
3.7k
Forks
307
Avg merge
14h 22m
Merged PRs (30d)
5

Description

Even though it might be tricky, it would be great to support objects in frontmatter.

I have a few files that have the following frontmatter shape:

---
title: 3 Tips To Write Better Code As A Beginner Frontend Developer
category: 'Engineering'
cover:
  src: '/images/posts/3-tips-to-write-better-code-as-junior-developer/alex-kotliarskyi-ourQHRTE2IM-unsplash.jpg'
  alt: 'A person sitting in front of a laptop'
  caption: 'Photo by <a href="https://unsplash.com/@frantic">Alex Kotliarskyi</a> on Unsplash'
publishedAt: '2023/04/04'
---

The cover property gets resolved to [object Object] though.

Bildschirm­foto 2023-07-20 um 06 36 11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the frontmatter example in the report and trace the editor's frontmatter handling entry point; no file or test is named in the issue. The work is done when the nested cover value remains an object with its src, alt, and caption fields instead of rendering as [object Object].

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript, yaml
Domain
content, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.