如何将 Metaplex/Candymachine 功能添加到现有网站?

How to add Metaplex/Candymachine function to an existing website?

我希望有人能给我指出正确的方向。我想将 Metaplex/candymachine 功能添加到最初为使用元掩码而构建的现有网站。只是想避免自己重做网站。谢谢

不幸的是,没有真正简单的方法可以做到这一点,除非您事先有一些 HTML/CSS/and JS 知识。

一些人所做的是从 CandymachineUI 中获取逻辑,可以在此处找到 CandyMachine.ts which is a type script file and port it over to their own website. You could also attempt to remake the UI calling to these functions and data, or failing that pulling the existing Mint area out the CandymachineUI site(基于 React)并尝试将其插入到您现有的站点中。如果您采用这种方法,我建议您将 MUI 组件换成 div 和您自己的 CSS 以节省将 MUI 添加到您的站点添加一些臃肿(除非你的网站已经使用 MUI 那么你很高兴)。

切记,您还需要支持依赖项。

还有其他社区建立了 UI,但您将 运行 遇到将所有 js/ts 移植到您自己的站点的相同问题。

我总是说围绕已经制作好的 mint 模板重建站点通常比将 mint 功能放入原始模板更快。