bit
bit copied to clipboard
displayName frontmatter property not working in docs.mdx
Describe the bug
displayName frontmatter property not working
Steps to Reproduce
- Create a component.docs.mdx file
- Override the Title by adding a
displayNamein 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.
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 watchThat will compile again every time there is a change, and in another onebit startto run your local server.
Afterwards these steps, you should be able to see the changes in your local server.
Hi. Thanks for the response, but recompiling does not change the display name.
it's not about a recompile, but rather re-tag and export the component with these modifications