Hexo
How to embed LikeCoin button into Hexo
Function: Add LikeCoin button automatically according to the post URL
<div>
<script type="text/javascript">
document.write(
"<iframe scrolling='no' frameborder='0' sandbox='allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-storage-access-by-user-activation' style='height: 212px; width: 100%;' src='https://button.like.co/in/embed/[LikerID]/button?referrer=" +
encodeURIComponent(location.href.split("?")[0].split("#")[0]) + "'></iframe>");
</script>
<div>Add the LikeCoin button at the end of each post
{% if theme.related_posts.enable and (theme.related_posts.display_in_home or not is_index) %}
+ {% include '../_custom/like_coin.ejs' %}
{% include '../_partials/post/post-related.swig' with { post: post } %}
{% endif %}Last updated