How can I add custom scripts in index.html's head part in Docusaurus V2?

后端 未结 3 701
渐次进展
渐次进展 2021-02-14 14:51

We are making a website with Docusaurus V2.

In Docusaurus V1, there is a scripts setting in siteConfig.js to cusutimize html\'s head content. B

3条回答
  •  旧巷少年郎
    2021-02-14 15:15

    I have no idea if you solved this. Your friend is the Lifecycle API.

    Specifically you want this: https://v2.docusaurus.io/docs/lifecycle-apis#injecthtmltags

    Build a plugin and use the above. D2 is looking pretty strong, I wish they'd release a stable version 2 soon!

提交回复
热议问题