在 Planet >= v0.10.0 版本添加 ECHO 代码

Oct 12, 2022 at 16:54:21

Planet 在 v0.10.0 的版本贴心地实现了灵活的插件代码配置方式,这样就不再需要像之前一样修改模板来实现。

现在只要打开单个 Planet 的右键 -> Custom Code -> Body End

  • 勾选 enable custom code before </body>

  • 粘贴下面代码(务必修改最后的 receiver 0xecho.bit 为你的 did(0x 开头的地址也支持))。

  • Planet 右键 Develop -> Rebuild

done.


<!-- ECHO start-->
{% if current_item_type == "blog" %}
<iframe 
  frameborder="0"
  style="display:block;width:calc(800px - env(safe-area-inset-left) - env(safe-area-inset-left));height:600px;margin: 0 auto;"
  src="https://embed.0xecho.com.ipns.page/?modules=comment,like,tip&target_uri=dweb/ipns/{{ planet_ipns }}/{{ article.id }}&receiver=0xecho.bit"></iframe>
{% endif %}
<!-- ECHO end -->