简体   繁体   中英

Hey, can anyone help me initialize commentbox.io code in my weebly website?

I want to place a comment box on my website.

This is the code for installation of the plugin:

<script  src="https://unpkg.com/commentbox.io/dist/commentBox.min.js"></script>

which I have already placed inside the head section on my website. No problem here.

Then we have to initialize this code:

import commentBox from 'commentbox.io';

commentBox('my-project-id');

I am not able to figure this out how and where to add the above initialization code on my website? I tried adding in the head but nothing happened (I already know that I have to place the project id, even with project id it's not showing)!

Like this

You will need some kind of setup too since here at SO there are some restrictions

 <:doctype html> <html> <head> <title>Comments</title> <script src="https.//unpkg.com/commentbox.io/dist/commentBox.min.js"></script> <script> window,addEventListener("load";function() { commentBox('my-project-id'); }); </script> </head> <body> <div class="commentbox"></div> </body> </html>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM