All Projects → KrzysiekJ → Jekyll Paspagon

KrzysiekJ / Jekyll Paspagon

Licence: mit
Sell your Jekyll blog posts in various formats for cryptocurrencies.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Jekyll Paspagon

Coingraph
Coingraph is a real-time graph for cryptocurrencies.
Stars: ✭ 116 (+1350%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Socktrader
🚀 Websocket based trading bot for 💰cryptocurrencies 📈
Stars: ✭ 152 (+1800%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Gnome Feeder
Profit Trailer Feeder Full Build with Settings
Stars: ✭ 122 (+1425%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Cryptex
Gemini, GDAX, Bitfinex, Poloniex, Binance, Kraken, Cryptopia, Koinex, BitGrail and CoinMarketCap cryptocurrency exchange API clients in Swift / iOS SDK. Check prices and account balances using Sample iOS app.
Stars: ✭ 51 (+537.5%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Profit Trailer Settings
Place to store and stay up to date with configs & strategies from the CryptoGnome Group
Stars: ✭ 335 (+4087.5%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Libreselery
Continuous distribution of funding to your project contributors and dependencies. Integrated into GitHub Actions
Stars: ✭ 92 (+1050%)
Mutual labels:  bitcoin, cryptocurrency, payment
Cryptocurrency Icons
A set of icons for all the main cryptocurrencies and altcoins, in a range of styles and sizes.
Stars: ✭ 2,116 (+26350%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Crypto Whale Watcher
An app to keep a watch on big volume trades of cryptocurrecies on different exchanges by sending alerts via a Telegram Bot.
Stars: ✭ 60 (+650%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Bitcoin Chart Cli
Bitcoin chart for the terminal as command line util
Stars: ✭ 221 (+2662.5%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Gekko Backtesttool
Batch backtest, import and strategy params optimalization for Gekko Trading Bot. With one command you will run any number of backtests.
Stars: ✭ 203 (+2437.5%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Peatiocryptoexchange
An open-source Crypto-Currency exchange. Peatio v3.0 Coming Soon !
Stars: ✭ 141 (+1662.5%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Bitcoinlib
Bitcoin Core RPC compatible, battle-tested .NET library and RPC wrapper for Bitcoin and Altcoins
Stars: ✭ 350 (+4275%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Bitcoin Etl
ETL scripts for Bitcoin, Litecoin, Dash, Zcash, Doge, Bitcoin Cash. Available in Google BigQuery https://goo.gl/oY5BCQ
Stars: ✭ 174 (+2075%)
Mutual labels:  bitcoin, cryptocurrency, aws
Wolfbot
Crypto currency trading bot written in TypeScript for NodeJS
Stars: ✭ 335 (+4087.5%)
Mutual labels:  bitcoin, cryptocurrency, cryptocurrencies
Coiniumserv
Next-gen crypto currency mining pool software
Stars: ✭ 651 (+8037.5%)
Mutual labels:  bitcoin, cryptocurrency, payment
Rome
Carthage cache for S3, Minio, Ceph, Google Storage, Artifactory and many others
Stars: ✭ 724 (+8950%)
Mutual labels:  aws, aws-s3
Octobot
Cryptocurrency trading bot: high frequency, daily trading, social trading, ...
Stars: ✭ 706 (+8725%)
Mutual labels:  bitcoin, cryptocurrency
Node Binance Trader
Cryptocurrency Trading Strategy & Portfolio Management Development Framework for Binance. Follow open NBT trading signals at
Stars: ✭ 720 (+8900%)
Mutual labels:  bitcoin, cryptocurrency
Lbry Sdk
The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
Stars: ✭ 7,169 (+89512.5%)
Mutual labels:  bitcoin, cryptocurrency
Freqtrade Strategies
Free trading strategies for Freqtrade bot
Stars: ✭ 697 (+8612.5%)
Mutual labels:  bitcoin, cryptocurrency

jekyll-paspagon

This Jekyll plugin allows you to sell blog posts in various formats (HTML, EPUB, AZW3, MOBI, PDF and more) for BlackCoin, using Amazon S3 and Paspagon.

Installation

Install dependencies

If you want to sell posts in formats other than HTML, install Pandoc. If you want to sell MOBI, AZW3 or PDF files, install Calibre.

Install plugin

Add the jekyll-paspagon gem to the :jekyll_plugins group in your Gemfile:

group :jekyll_plugins do
  gem 'jekyll-paspagon', '~>1'
end

Configure Paspagon

To your _config.yml, add a section adhering to the following example:

paspagon:
  # By making this entry, you indicate that you accept Paspagon’s terms of
  # service. Be sure that you’ve actually read these terms!
  accept-terms: https://github.com/Paspagon/paspagon.github.io/blob/master/terms-seller.md
  buckets:
    your-bucket-name:
      seller:
        country-code: PL
        email: [email protected] # Email is optional
      payment:
        # This section provides default values that you can override for each post.
        #
        # You can specify prices in BLK, BTC, XAU (troy ounce of gold) and some
        # other currencies (see Paspagon’s terms of service for a complete list).
        # (Paspagon takes only one price into account).
        price:
          USD: 3
        address:
          BLK: Byour-address
        # Time (in seconds) after which download link will expire.
        link-expiration-time: 600
  # A name of a bucket which will be used to store S3 request logs.
  logging_bucket: paspagon-logs-foo

Set default post configuration

Add the bucket and formats configuration to the default section in your _config.yml. This is optional, but handy.

defaults:
  - scope:
      path: ""
    values:
      formats:
        # This section provides default values that you can override for each post.
        html:
          paid_after: 15 # HTML version will be paid 15 days after publication.
        pdf:
          content_disposition: attachment
          # If you don’t provide content type, the plugin will try to set a
          # reasonable default for some popular formats, falling back to
          # application/octet-stream if necessary.
          content_type: application/pdf
          paid_before: 2 # PDF version will be paid for the first two days.
        epub: {} # EPUB version will be paid from the beginning.
      bucket: your-bucket-name

Caveat: “default” values in Jekyll are actually not default values that can be simply overridden. Instead they get “deep merged” into post variables. If you want to unset a specific nested value inside the formats hash, set it to false.

Change post template

Inform your readers that you offer alternate post formats by modifying the post template. In a simple form the relevant fragment may look like this:

{% unless page.formats == empty %}
  <p>Available formats:
    {% for format in page.format_array %}
      <a href="{{ format.full_url }}">{{ format.name }}</a>{% unless forloop.last %},{% endunless %}
    {% endfor %}
  </p>
{% endunless %}

A more sophisticated example, which uses the page.excerpt_only variable (set only when HTML is a paid format and a summary is being rendered):

{% unless page.formats == empty %}
  <p>
    {% if page.excerpt_only %}
      Available formats:
    {% else %}
      Alternate formats:
    {% endif %}
    {% for format in page.format_array %}
      {% if format.name != 'HTML' or page.excerpt_only %}
        <a {% if format.paid %}class="paid" {% endif %}href="{{ format.full_url }}">{{ format.name }}</a>{% unless forloop.last %},{% endunless %}
      {% endif %}
    {% endfor %}
  </p>
{% endunless %}

Change feed template

If you provide a RSS/Atom feed, you may want to ensure that it contains only post excerpts instead of complete contents. Typically, you will need to change {{ post.content | xml_escape }} to {{ post.excerpt | xml_escape }} in your feed.xml template.

Generate full URLs everywhere

If you’re going to sell HTML versions of your posts (which will be hosted on a different domain), you should ensure that links on your website contain the domain. The easiest way to do it is to remove all occurences of site.url from the templates (usually in feed.xml and _includes/head.html), add the domain to the baseurl setting in _config.yml and use its old value only when running jekyll serve:

jekyll serve --baseurl ''

Remember to run jekyll build before each deployment.

Usage

After doing the steps above, paid versions of your posts will be generated automatically.

If you specify thresholds like paid_before, you will need to run jekyll build again after reaching them.

You may override formats, assigned buckets, prices, payment addresses and link expiration times for each post by putting the relevant data in the YAML front matter:

layout: post
title: Foo
payment:
  price:
    USD: false
    XAU: 3
  address:
    BLK: Bfoo
bucket: foo
formats:
  epub:
    paid_after: 15
  pdf:
    # Setting this to false means that a post will be paid from the beginning.
    # If you want a format to be free instead, set this to 0.
    paid_before: false
  azw3: {}

Two Jekyll subcommands are available to synchronize paid content with Amazon S3. You need to specify AWS credentials beforehand.

paspagon_prepare

This command creates necessary buckets, configures logging and log expiration (to 90 days) and sets permissions for Paspagon. It typically needs to be executed only once, after configuring Paspagon.

paspagon_sync

This command uploads missing or updated paid files to S3 and removes ones which are not present locally. It should be ran each time a blog content update is deployed.

Markdown compatibility

jekyll-paspagon uses Pandoc to generate formats other than HTML. The default input format is markdown_github+yaml_metadata_block-hard_line_breaks. It may be impacted by some site settings like Kramdown’s hard_wrap, but the most reliable way of changing it is setting it explicitly in _config.yml:

pandoc:
  input: markdown_phpextra+yaml_metadata_block-fenced_code_blocks+strikeout

For more information, refer to Pandoc’s documentation on Markdown.

Versioning

This project uses semantic versioning.

License

This software is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].