Open ctaity opened 5 years ago
You've got to use AmpScripts
and AmpScriptsManager
to get all the scripts injected like this file:
https://github.com/dfrankland/ampreact/blob/435a2389e7bd6dcbdb7c3a08738c638c24511528/pages/_document.tsx
Also, anything that html-to-amp
parses / renders won't be injected since react-amphtml
only works with the React components it exports.
Ho ok, if i put amp html as dangerousHtml in for example in a div component, dont inject the dependecies for exameple amp-youtube.
Hi, i have a ws return html from wordpress, i use ampify or html-to-amp . to transform html to valid amp source, later inject the result with DangerousHTML. All works fine, except, react-amphtml dont inject necessary scripts like amp-youtube, or other amp scripts.
My code
How i can put the scripts into Head, i am using stater project: https://github.com/dfrankland/ampreact
Thanks