You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When investigating the meta description for the docs pages, we observe code fragments rather than something else like a tag line. This often leads to unsatisfying excerpts when pasting content in a chat client like Slack or MatterMost:
There have been other issues that seem to touch on this topic, but the problem remains.
If you look at the page source, you can see how the code ends up in the meta description field:
Not only does this affect our site, but it also affects the normal Docusaurus page. You'll find the same issue if you look at the page source for the Docusaurus Team Page. Here are the links for convenience:
🐛 Bug Report
When investigating the meta description for the docs pages, we observe code fragments rather than something else like a tag line. This often leads to unsatisfying excerpts when pasting content in a chat client like Slack or MatterMost:
There have been other issues that seem to touch on this topic, but the problem remains.
If you look at the page source, you can see how the code ends up in the meta description field:
Not only does this affect our site, but it also affects the normal Docusaurus page. You'll find the same issue if you look at the page source for the Docusaurus Team Page. Here are the links for convenience:
The location of my Docusaurus repo is here: https://github.com/Illumina/NirvanaDocumentation
Negative example
If I try the following, everything works as it should:
In this case we see that the description is set to
You can write JSX and use React components within your Markdown thanks to MDX.
We notice that in https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-init/templates/classic/docs/mdx.md, there are no JSX commands that get in the way.
In addition, we see that if description is added to the header of an MDX file, everything is fine:
Positive example
If we examine the following pages, we see that there are export statements that seem to incorrectly added into the metadata field:
Have you read the Contributing Guidelines on issues?
YES
To Reproduce
See examples above.
Expected behavior
The expectation is that JSX code will be skipped when extracting the meta description for a given page if one is not already provided in the header.
Actual Behavior
See screenshot above.
For https://illumina.github.io/NirvanaDocumentation/, the description is currently assigned the following:
Your Environment
Docusaurus version used: 2.0.0-alpha.66
Environment name and version: Node.js v10.19.0
Operating system and version: Ubuntu 20.04
Reproducible Demo
You can already view the page source for the following MDX pages:
My repo can be found here: https://github.com/Illumina/NirvanaDocumentation
The text was updated successfully, but these errors were encountered: