Skip to content

Instantly share code, notes, and snippets.

@ivanchromjak
Last active November 24, 2022 03:53
Show Gist options
  • Save ivanchromjak/29433af49e209995f737a52b45ec5712 to your computer and use it in GitHub Desktop.
Save ivanchromjak/29433af49e209995f737a52b45ec5712 to your computer and use it in GitHub Desktop.
Add PayPal donation button to Jekyll site
donations:
paypal:
text: Donate # Button text
id: 7334HG9754 # PayPal button ID
{% if site.donations.paypal %}
<form class="paypalform" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="{{ site.donations.paypal.id | default: 'UNCONFIGURED' }}">
<button class="donations uk-button uk-button-primary" name="submit">
<span>{{ site.donations.paypal.text | default: 'Donations' }}</span>
</button>
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
{% endif %}

{% include donations-paypal.html %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment