feat(doc): add zh-CN donation button tutorial

pull/701/head
ppoffice 2020-04-07 14:43:20 -04:00
parent ac5cad0d56
commit 92be85f8b7
4 changed files with 303 additions and 65 deletions

View File

@ -1,63 +0,0 @@
title: Making Money off Your Blog with Donation Buttons
date: 2016-01-30 00:00:01
donates:
-
type: alipay
qrcode: /gallery/donate/alipay.png
-
type: wechat
qrcode: /gallery/donate/wechat.jpg
-
type: paypal
business: paypal@paypal.com
currency_code: USD
-
type: patreon
url: https://www.patreon.com/
categories:
- Plugins
- Donation
---
To enable donation buttons right below the post content, fill out the `donate` section in the theme's `_config.yml` file. The following donation entries are currently supported by Icarus. You can always use one or more of these donation entries in your blog.
<!-- more -->
### Alipay
```yml
donate:
-
type: alipay
qrcode: # the URL to your qrcode image
```
### Wechat
```yml
donate:
-
type: wechat
qrcode: # the URL to your qrcode image
```
### Paypal
You need to enable the paypal donation button at [Paypal Donate Button](https://www.paypal.com/donate/buttons/). Once you're done, please find the `business` and `currency_code` in the generated code and fill them in the `_config.yml`.
```yml
donate:
-
type: paypal
business: # Your paypal email address or generated business ID
currency_code: # currency code
```
### Patreon
```yml
donate:
-
type: patreon
url: # the URL to your Patreon page
```

View File

@ -0,0 +1,153 @@
title: Icarus User Guide - Donation Buttons
date: 2017-01-31
categories:
- Plugins
- Donation
tags:
- Icarus User Guide
language: en
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">
This article is also available in: <a href="{% post_path zh-CN/Donation-Buttons %}">简体中文</a>.
</div>
This article covers some donation buttons supported by Icarus 3.
If you need to display multiple donation buttons at once, simply add individual button configurations
to the `donates` array like this
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: ... # Button 1
...
-
type: ... # Button 2
...
{% endcodeblock %}
<div class="notification is-info is-size-6">
The donation button feature of Icarus is provided by
[ppoffice/hexo-component-inferno](https://github.com/ppoffice/hexo-component-inferno).
Please refer to it for a complete list of supported buttons and their configurations.
</div>
<!-- more -->
## Alipay
Log into Alipay and export payment QR code. Save the picture to a photo or asset directory
of your Hexo website or upload it to an image sharing service.
Then, add the following configuration to your theme's configuration file:
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: alipay
# Path to your QR code image
qrcode: /path/to/alipay/qrcode.png
{% endcodeblock %}
## Buy me a Coffee
Register for [Buy me a Coffee](https://www.buymeacoffee.com/) and copy the URL to your personal page.
Add the following configuration to your theme's configuration file:
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: buymeacoffee
# Path to your Buy me a Coffee personal page
url: /path/to/buymeacoffee/personal/page
{% endcodeblock %}
## Paypal
1. Register and log into Paypal, click [here](https://www.paypal.com/donate/buttons/) to make a Paypal donation
button.
2. Select correct "Country/Region" and "Language" in the "Choose button style" page, click "Continue" to
advance to the next page.
3. Select "Use account ID" or "Use email addres" as the unique identifier of your account in the "Add organization
details" page. Click "Continue" to go to the next page.
4. Set the correct "Currency you'll receive donations in" and "Amount donors can give" to "Any amount" in the
"Set donation amounts" page. We currently do not support the option of donating in "An exact amount".
Click "Finish and Get Code" to go to the next page.
5. Copy `business` and `currency_code` from the "Button HTML" on the page. Put them to the theme's configuration.
For example, the following Paypal donation button code
{% codeblock Paypal HTML code 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 %}
is translated into this configuration
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: paypal
business: XXXXXXXXXXXXX
currency_code: USD
{% endcodeblock %}
## Patreon
Register for [Patreon](https://www.patreon.com/) and copy the URL to your personal page.
Add the following configuration to your theme's configuration file:
{% codeblock themes/icarus/_config.yml lang:yaml %}
donate:
-
type: patreon
# Path to your Patreon personal page
url: /path/to/patreon/personal/page
{% endcodeblock %}
## WeChat
Log into WeChat and export payment QR code. Save the picture to a photo or asset directory
of your Hexo website or upload it to an image sharing service.
Then, add the following configuration to your theme's configuration file:
{% codeblock themes/icarus/_config.yml lang:yaml %}
donates:
-
type: wechat
# Path to your QR code image
qrcode: /path/to/wechat/qrcode.png
{% endcodeblock %}
<div class="notification is-warning is-size-6">
Something wrong with this article? Click <a href="https://github.com/ppoffice/hexo-theme-icarus/edit/site/source/_posts/en/Donation-Buttons.md">here</a> to submit your revision.
</div>

View File

@ -1,5 +1,5 @@
title: Icarus用户指南 - 评论系统
date: 2017-01-31 21:55:37
date: 2017-01-31
categories:
- Plugins
- Comment
@ -331,7 +331,7 @@ Gitment项目似乎已停止维护建议使用Gitalk或utterances作为基于
highlight: true # 可选填
record_ip: false # 可选填
{% endcodeblock %}
<div class="notification is-warning is-size-6">
文章内容有误?请点击<a href="https://github.com/ppoffice/hexo-theme-icarus/edit/site/source/_posts/zh-CN/Comment-Plugins.md">此处</a>提交修改。

View File

@ -0,0 +1,148 @@
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 %}
<div class="notification is-info is-size-6">
Icarus的赞赏按钮由[ppoffice/hexo-component-inferno](https://github.com/ppoffice/hexo-component-inferno)
提供,具体提供的按钮种类与配置以其为准。
</div>
<!-- more -->
<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>