GithubHelp home page GithubHelp logo

uta-org / jekyll-patreon Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 8.0 88 KB

Patreon support in Jekyll blog to easily embed a widget with your goals

License: GNU General Public License v3.0

Ruby 23.98% HTML 16.40% CSS 51.62% JavaScript 7.99%
jekyll jekyll-plugin patreon i18n ruby ruby-gem rubygem

jekyll-patreon's Introduction

jekyll-patreon Build Status Gem Version

Requires Ruby 2.5+ and Jekyll 3.8+

A Jekyll plugin that adds Patreon support in your blog to easily embed a widget with goals

Features

  • Supports several designs: default, fancy, minimal, streamlined, reversed, swapped
  • Supports several colors: red, green, orange, red nostripes, green nostripes, orange nostripes, blue nostripes
  • Supports i18n (compatible with jekyll-language-plugin)
  • Supports Markdown on your Patreon goals

To see the possible styles && designs navigate to the assets folder where the screenshots are located

Installation

Add this line to your site's Gemfile:

gem 'jekyll-patreon'

Add this configuration to your _config.yml file:

####################
# Patreon Settings #
####################

patreon:
    enabled: true
    design: 'default' # Supports the following desings: default, fancy, minimal, streamlined, reversed, swapped
    title: 'Example title'
    metercolor: 'green' # Supports the following colors: red, green, orange, red nostripes, green nostripes, orange nostripes, blue nostripes
    toptext: 'Example top text' # Text that appears in before the progress bar (optional)
    bottomtext: 'Example bottom text' # Text that appears in after the progress bar (optional)
    showgoaltext: true # Display the goal text?
    showbutton: true # Display the "Become a patron" button?
    username: 'Your username here'
    default_lang: "en" # The default language to use (to avoid writing twice the same text from Patreon)

Usage

Simply just put the following tag where you need this:

{% patreon %}

i18n

To support languages just use jekyll-language-plugin configuration. Or if you don't use it, do the following steps.

First, in your main index.html (or wherever you need the i18n support) declare the following lines:

---
layout: <layout>
language: en
---

Or if you want to support several languages in the same page:

---
layout: <layout>
languages:
- en
- es
---

Then, in "_data/lang/" create one file for each lang.

Example: en.yml and es.yml.

Then, write the translations of you goals like this:

#################
# Patreon Goals #
#################

patreon_goal_0: "..."
patreon_goal_1: "..."
patreon_goal_2: "..."
# etc etc...

There you will need to create as much translations as the number of goals that your Patreon page have. (Note: starting index is 0 (zero))

Issues

Having issues? Just report in the issue section. Thanks for the feedback!

Contribute

Fork this repository, make your changes and then issue a pull request. If you find bugs or have new ideas that you do not want to implement yourself, file a bug report.

Donate

Become a patron, by simply clicking on this button (very appreciated!):

... Or if you prefer a one-time donation:

Copyright

Copyright (c) 2019 z3nth10n (United Teamwork Association).

License: GNU General Public License v3.0

jekyll-patreon's People

Contributors

z3nth10n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.