Facebook debugger does not detect meta tags if <!DOCTYPE html> is set
Steps to reproduce are tricky, and unsure if it'll be possible, but worth a shot—we have a large (and new) application using create-react-app.
If <!DOCTYPE html> is included in index.html the build + locally served application does not have the correct meta tags for a bot—but are visible in the inspector.
If it is not included, the build + locally served application has the correct meta tags on render and is visible.
This may not be a react-helmet issue as I have seen removing doctype as a temporary solution mostly in Netlify (although we aren't using that) but I thought I'd post the issue and see if anyone is facing something similar.
What is the expected behavior?
Meta tags display in Facebook debugger
Which versions of React and react-helmet, and which browser / OS are affected by this issue?
Did this work in previous versions of React and/or react-helmet?
Latest Chrome
react-helmet: 6.1.0react: 17.0.1
Do you want to request a feature or report a bug?
What is the current behavior?
<!DOCTYPE html>
is setSteps to reproduce are tricky, and unsure if it'll be possible, but worth a shot—we have a large (and new) application using
create-react-app
.If
<!DOCTYPE html>
is included inindex.html
the build + locally served application does not have the correct meta tags for a bot—but are visible in the inspector.If it is not included, the build + locally served application has the correct meta tags on render and is visible.
I am using a chrome extension to read the tags on the served page. (https://chrome.google.com/webstore/detail/meta-tag-analyzer/fjaojohahonilkanpijpfhkekbegbkfa)
This may not be a react-helmet issue as I have seen removing doctype as a temporary solution mostly in Netlify (although we aren't using that) but I thought I'd post the issue and see if anyone is facing something similar.
What is the expected behavior?
Which versions of React and react-helmet, and which browser / OS are affected by this issue? Did this work in previous versions of React and/or react-helmet? Latest Chrome
react-helmet
:6.1.0
react
:17.0.1