Render pure text into the og:description meta tag #1066
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
feature
This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
good first issue
If you are just getting started with Docusaurus, this issue should be a good place to begin.
help wanted
Asking for outside help and/or contributions to this particular issue or PR.
🐛 Bug Report
Currently, after my Pull Request #1054 I realized that maybe it's not best option to render raw HTML into the og:description meta tag. I think that It just doesn't look nice or at least it doesn't help a readability at all. Maybe we could stick to the option of rendering a pure "text-like" output into the og:description.
Have you read the Contributing Guidelines on issues?
yes
To Reproduce
3 .Navigate and then copy a URL address of the doc that you just prepared.
Expected behavior
In my opinion, it could be way more user-friendly if we could show to the user potentially as much of clear text as possible.
So from example described in Actual Behavior part of this issue, I think that rendered og:description can look like:
Actual Behavior
Let's say your actual Doc page starts with:
Currently, after running your app in Open Graph Preview you will see something like:
or in a browser dev tools something like this:
Reproducible Demo
You can find reproducible demo on my github fork repository sinodko/Docusaurus. But in overall I think it is a lot more simpler to just copy/paste Actual Behavior example into any of your own Doc file.
If you want to use my fork anyways then there are some steps to make it work:
Clone my fork and run
yarn install
from root andyarn start
fromv1/
folder. After development server is started just head to Docs -> Installation or url:http://localhost:3000/docs/en/installation
.That should be it :) Look for your og:description tag.
Note: If you would like to check it by Open Graph Preview then you need to make localhost dev server accessible from "other side" of your router :D. The most simple way to do so is by my opinion to use ngrok. Continue by installation of ngrok and after installation run command
./ngrok http 3000
which will create a public IP address that will somehow point to your Docusaurus development server... After this you are free to use Open Graph Preview, but insteadhttp://localhost:3000/docs/en/installation
writehttp://ngrok-generated-key.ngrok.io/docs/en/installation
.The text was updated successfully, but these errors were encountered: