hexo-theme-icarus/source/_posts/zh-CN/Donation-Buttons.md

159 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

title: Icarus用户指南 - 赞赏按钮
date: 2017-01-31
categories:
- Plugins
- Donation
tags:
- Icarus用户指南
language: zh-CN
toc: true
donates:
-
type: alipay
qrcode: /gallery/donate/alipay.png
-
type: buymeacoffee
url: https://www.buymeacoffee.com/
-
type: paypal
business: paypal@paypal.com
currency_code: USD
-
type: patreon
url: https://www.patreon.com/
-
type: wechat
qrcode: /gallery/donate/wechat.jpg
---
<div class="notification is-success is-size-6">
本文同时提供以下语言的翻译:<a href="{% post_path en/Donation-Buttons %}">English</a>
</div>
本文介绍Icarus 3支持的一些赞赏按钮的安装配置。若需同时展示多个按钮只需在主题配置的`donates`数组中添加多个按钮配置,例如
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: ... # 按钮1
...
-
type: ... # 按钮2
...
{% endcodeblock %}
<!-- more -->
<div class="notification is-link is-size-6">
Icarus的赞赏按钮由[ppoffice/hexo-component-inferno](https://github.com/ppoffice/hexo-component-inferno)
提供,具体提供的按钮种类与配置以其为准。
</div>
<style>
.content ol:not([type]) {
list-style-type: simp-chinese-informal;
}
</style>
## 支付宝
**安装指南**
登录支付宝并导出个人支付二维码图片放置在网站的图片或附件文件夹下,或上传至图床,然后在主题配置中添加如下配置项:
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: alipay
# 支付宝二维码图片地址
qrcode: /path/to/alipay/qrcode.png
{% endcodeblock %}
## Buy me a Coffee
**安装指南**
注册[Buy me a Coffee](https://www.buymeacoffee.com/)并复制个人赞助页面的地址,填写到如下主题配置中:
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: buymeacoffee
# 个人赞助页面的地址
url: /path/to/buymeacoffee/personal/page
{% endcodeblock %}
## Paypal
**安装指南**
1. 注册并登录Paypal点击[此链接](https://www.paypal.com/donate/buttons/)来创建Paypal捐赠按钮。
2. 在选择按钮样式(Choose button style)页面正确填写“国家/地区”(Country/Region),“语言”(Language)后,点击“继续”(Continue)
进入下一页面。
3. 在添加机构详情(Add organization details)页面中选择“使用账号ID”(Use account ID)或“使用Email地址”(Use email address)
作为唯一账号标识符。点击“继续”(Continue)进入下一页面。
4. 在“设置捐赠数额”(Set donation amounts)页面选择你要“接收的货币种类”(Currency you'll receive donations in),捐赠数额选择
“任意数额”(Any amount)。此按钮暂不支持指定数额的捐赠选项。点击“结束并获取代码”(Finish and Get Code)按钮进入下一页面。
5. 从页面上的“按钮HTML代码”(Button HTML)中复制`business`和`currency_code`两项的值并填写到主题配置中。例如下方的Paypal按钮
代码
{% codeblock Paypal按钮HTML代码 lang:html %}
<form action="https://www.paypal.com/cgi-bin/webscr" ...>
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="business" value="XXXXXXXXXXXXX" />
<input type="hidden" name="currency_code" value="USD" />
...
</form>
{% endcodeblock %}
对应的主题配置为
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: paypal
business: XXXXXXXXXXXXX
currency_code: USD
{% endcodeblock %}
## Patreon
**安装指南**
注册[Patreon](https://www.patreon.com/)并复制个人赞助页面的地址,填写到如下主题配置中:
{% codeblock themes/icarus/_config.yml lang:yaml %}
donate:
-
type: patreon
# 个人赞助页面的地址
url: /path/to/patreon/personal/page
{% endcodeblock %}
## 微信
**安装指南**
登录微信并导出个人支付二维码图片放置在网站的图片或附件文件夹下,或上传至图床,然后在主题配置中添加如下配置项:
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: wechat
# 微信二维码图片地址
qrcode: /path/to/wechat/qrcode.png
{% endcodeblock %}
<div class="notification is-warning is-size-6">
文章内容有误?请点击<a href="https://github.com/ppoffice/hexo-theme-icarus/edit/site/source/_posts/zh-CN/Donation-Buttons.md">此处</a>提交修改。
</div>