bit icon indicating copy to clipboard operation
bit copied to clipboard

displayName frontmatter property not working in docs.mdx

Open mel-miller opened this issue 3 years ago • 2 comments

Describe the bug

displayName frontmatter property not working

Steps to Reproduce

  1. Create a component.docs.mdx file
  2. Override the Title by adding a displayName in the frontmatter block. For example:

```

displayName: "Card000" description: "A Card component."

labels: ["compound component"]


### Expected Behavior
Based on [this documentation](https://harmony-docs.bit.dev/aspects/mdx/#using-the-frontmatter-api) I would expect that the doc page's title would be overridden by the value specified for `displayName`. The other frontmatter properties do work as expected, but the Doc page title doesn't change.

### Specifications
* Bit version: 0.0.651
* Workspace type: harmony
* Node version: v16.13.1
* npm / yarn version: yarn 1.22.15
* Platform: OSX 12.2

_for harmony workspace_


* relevant env: teambit.react/react 
* relevant aspects: unknown

### Additional context
I used `bit create react-component-js` to create my components.

mel-miller avatar Feb 17 '22 23:02 mel-miller

Hi!

The problem

You are viewing an 'older' version of your component since it hasn't been re compiled afterwards the changes.

The solution

You will need to compile again to view the changes in the local server. In order to do that, you can compile and restart your server:

  • bit compile && bit start

Or, alternatively, run in another terminal window:

  • bit watch That will compile again every time there is a change, and in another one
  • bit start to run your local server.

Afterwards these steps, you should be able to see the changes in your local server.

jonatankBIT avatar Feb 21 '22 08:02 jonatankBIT

Hi. Thanks for the response, but recompiling does not change the display name.

mel-miller avatar Feb 22 '22 00:02 mel-miller

it's not about a recompile, but rather re-tag and export the component with these modifications

itaymendel avatar May 21 '23 15:05 itaymendel