LikeCoin
WebsiteDiscord GitHubSupport Us
中文
中文
  • LikeCoin - 去中心出版
  • Liker Land 答客問
  • 📕去中心出版
    • 去中心出版
    • Liker Land 書店 Affiliation Program
      • Stripe Connect Payout Account Status
    • 上架電子書的常見問題
    • 上架電子書
      • 上架 PDF 電子書
    • 管理電子書
      • 設定電子書套裝
      • 購買連結
      • 批量製作 QR Code 與短網址
      • 管理 Authz 授權
      • 補書上架
      • 修改已出版的電子書資料
      • 銷毁已出版的電子書
    • 購買電子書
      • 送贈電子書
      • 閱讀電子書
      • 匯入電子書檔到閱讀器
        • 匯入電子書檔到 Readmoo
        • 匯入電子書檔到 Kobo
      • 其他電子書平台
        • 端點出版
        • 董富記
        • BookForest
    • 註冊帳戶
      • 重設密碼
      • 保護你的 Liker ID
      • 管理登入裝置
      • 修改頭像及顯示名稱
      • 匯出錢包助記詞
      • 什麼是 Authcore?
    • Liker Land 功能介紹
      • 我的書架
      • 通知功能
      • 關注創作者
      • NFT 詳細資訊
    • 發送 NFT
      • 群發 NFT 紀念品給支持者
    • 其他 NFT 工具
    • Writing NFT 常見問題
    • 出版 Writing NFT
      • 電郵或社交登入
      • Keplr
      • Cosmostation
      • Cosmostation app
      • Matters
      • Liker Social
      • illustBuy
      • 以 ISCN ID 出版 NFT
    • 收藏 Writing NFT
      • 以桌機用 LIKE 購買 Writing NFT
      • 以手機用 LIKE 購買 Writing NFT
      • 一鍵收藏 Writing NFT
      • NFT 小部件
      • 動態定價
      • 二級市場
    • ISCN
      • ISCN 和 IPFS 的關係是什麼?
      • ISCN 的去中心特性對內容生態有什麼好處?
      • ISCN 支援什麼內容格式?
      • 如何註冊 ISCN
        • 電郵或社交登入
        • Keplr
        • Cosmostation
        • Cosmostation app
        • Matters
      • 如何大量註冊 ISCN
      • ISCN Browser
  • 🧭指南
    • 傳媒報導
    • 社群
      • #Community Call
      • #open-a-ticket
      • #faucet-testnet
      • #translate-wallet-prefix
      • LikeCoin Discord 錢包
      • LIKE this mesage
    • 水龍頭
    • 錢包
      • LIKE pay
      • Keplr 瀏覽器擴充功能
        • 安裝 Keplr 及註冊錢包
          • 以助記詞方式註冊新錢包
        • Keplr:存入及轉帳
        • Keplr + dao.like.co:提存、委託、治理
        • 在 Keplr 導入錢包
      • Keplr 手機錢包
        • 安裝 Keplr 手機錢包
        • Keplr Mobile:存入及轉帳
        • 在 Keplr Mobile 導入錢包
      • Cosmostation 瀏覽器擴充功能
        • 安裝 Cosmostation 瀏覽器擴充功能
        • Cosmostation:存入及轉帳
        • Comostation + dao.like.co:提存、委託、治理
        • 在 Cosmostation 導入錢包
      • Cosmostation 手機錢包
        • 安裝 Cosmostation app
        • Cosmostation app:存入及轉帳
        • 在 Cosmostation app 導入錢包
      • Leap 瀏覽器擴充功能
        • 安裝 Leap 瀏覽器擴充功能
        • Leap:存入及轉帳
        • 在 Leap 導入錢包
      • 多簽錢包
      • 錢包地址
      • 區塊瀏覽器
        • dao.like.co
        • Ping.pub
        • ATOMScan
      • 手續費
      • 新地址前綴 (like) 常見問題
      • 由 ERC-20 升級
        • 升級 LikeCoin ERC-20 到 LikeCoin chain
        • 升級 LikeCoin 的常見問題
    • 交易
      • 購買 LikeCoin
      • 在 Osmosis 交易
      • 註冊 DigiFinex 帳號
      • 在 DigiFinex 交易
      • 在 MyEthShop 交易
      • 場外交易
    • 流動性
      • Osmosis
    • 委託
      • 委託 LikeCoin
        • 以桌機委託 LikeCoin
        • 以手機委託 LikeCoin
      • 取回委託 LikeCoin
        • 以桌機取回委託
        • 以手機取回委託
      • 轉移委託 LikeCoin
        • 以桌機轉移委託
        • 以手機轉移委託
      • 因委託而產生的 LikeCoin 回報,錢從何來?
    • 治理
      • 社群治理會議
      • LikeCoin chain
      • 流動民主
      • 為議案存入保證金
      • 持份者直接投票
        • 以桌機投票
        • 以手機投票
      • 驗證人
        • 成為驗證人
        • 社群委託
        • 驗證人報表
      • 歷史議案
    • 去中心應用
      • LikeCoin app
        • 下載 LikeCoin app
        • Like — 化讚為賞
        • Super Like — 推文到宇宙
      • Liker ID
        • 以 Keplr 註冊 Liker ID
        • 綁定社交帳戶
      • 讚賞公民
        • 如何成為讚賞公民
        • 讚賞公民設定
        • 常見問題
        • 創作基金
        • 專屬優惠
        • 讚賞公民 Web3 報表
      • Web3Press
      • LikeCoin button 讚賞鍵
        • Matters
        • 其他自架網站
          • ghost
          • Hexo
          • Hugo
          • Jekyll
          • mdBook
          • October CMS
          • 其他
        • 其他寫作平台
          • 香港獨立媒體網
          • illustBuy
          • Tipga
          • Blink
          • Blogspot
          • SteemCN
          • Wix / Weebly
          • Write.as
      • 創作者工具
        • 查看讚賞成就
        • 每月創作進度
        • 創作基金排行榜
        • 奬勵發放時間
        • 未能收到獎勵?
        • 開發者簡介
      • Liker.Social
      • depub.space
        • 從 LikeCoin Discord 推文到 depub.space
        • 為 depub.space 增添頭像
      • 詞彙表
    • 品牌素材下載
Powered by GitBook
On this page
  • 增加根據文章網址,自動產生讚賞鍵鏈結
  • 在每篇文章末端加上讚賞鍵
  • 參考文章
Export as PDF
  1. 指南
  2. 去中心應用
  3. LikeCoin button 讚賞鍵
  4. 其他自架網站

Hexo

如何在 Hexo 開發環境的文章中加入 LikeCoin button

PreviousghostNextHugo

Last updated 8 months ago

感謝用戶 的教學範本。

安裝讚賞鍵以前,請先 。

增加根據文章網址,自動產生讚賞鍵鏈結

在 themes/next/layout/_custom/ 目錄下新增一檔案 like_coin.ejs 並貼上下列程式碼,並將 [LikerID] 更改為你的 Liker ID。

<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>

在每篇文章末端加上讚賞鍵

打開 themes/next/layout/_macro/post.swig 在合適的位置把 like_coin.ejs 放置好

 {% 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 %}

如果您沒有開啟相關文章的話,則加在往上幾行的 {{ post.content }} 後方

        {% else %}
          {% if post.type === 'picture' %}
            <a href="{{ url_for(post.path) }}">{{ post.content }}</a>
          {% else %}
            {{ post.content }}
+      {% include '../_custom/like_coin.ejs' %}
          {% endif %}
        {% endif %}
      {% else %}
        {{ post.content }}
+      {% include '../_custom/like_coin.ejs' %}
      {% endif %}
    </div>

完成後就可以看到讚賞鍵出現在文章中。

參考文章

🧭
只是個打字的
註冊 Liker ID
在Hexo NexT增加like Button
如何将Liker按钮集成到Hexo
藍圖重生(一):給 Hexo 文章 加上 LikeCoin 的贊賞鍵
Hexo教學2 iframe(likecoin)