• Stars
    star
    259
  • Rank 157,669 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Jekyll generator for automatically crossposting to Medium

This project is in search of a new sponsor as the author is no longer using Jekyll.


Crosspost to Medium Generator for Jekyll and Octopress

This plugin makes it possible to automatically syndicate your posts to Medium from your Jekyll and Octopress projects.

Gem Version Security

Setup

  1. Sign up for a Medium account (if you donโ€™t already have one). Log in.
  2. Request access to the "integration tokens" settings by emailing [email protected]. Medium will then grant you access to a clientId and a clientSecret on your settings page. Read their API docs for more information
  3. Go to your settings page and look for "Integration Tokens". Generate one. Save it to your Environment Variables as MEDIUM_INTEGRATION_TOKEN.
  4. Visit https://api.medium.com/v1/me?accessToken=, adding your Integration Token to the end of that URL
  5. Grab the id from the JSON provided and save that to your Environment Variables as MEDIUM_USER_ID.
  6. Copy jekyll-crosspost-to-medium.rb to your siteโ€™s plugins folder.

Installation

This plugin can be installed in two ways:

  1. As a Ruby Gem: gem install jekyll-crosspost-to-medium
    • Via _config.yml add jekyll-crosspost-to-medium to your gems list; or
    • Add require 'jekyll-crosspost-to-medium' to ext.rb in your plugins directory (new or existing one)
  2. By directly copying jekyll-crosspost-to-medium.rb (found in the lib directory) into your plugins directory.

Crossposting

Add crosspost_to_medium: true to the front matter of any post you would like to crosspost to Medium.

Configuation

This plugin takes a number of configuration options. These allow you to customise how the plugin works and what metadata is included when you syndicate to Medium. The following options are available:

jekyll-crosspost_to_medium:
  enabled: true | false
  cache: .jekyll-crosspost_to_medium
  status: public (default) | draft | unlisted
  license: all-rights-reserved (default) | cc-40-by | cc-40-by-sa | cc-40-by-nd | cc-40-by-nc | cc-40-by-nc-nd | cc-40-by-nc-sa | cc-40-zero | public-domain
  text: '<p><i>Your (optional) signoff for the post.</i></p>',
  backdate: true (default) | false
  • enabled

    Default: true

    Controls crossposting globally. Setting this to false will skip the processing loop entirely which can be useful for local preview builds.

  • cache

    Default: [source directory]/.jekyll-crosspost_to_medium

    The name of the diretory where crossposted files will be logged. Make sure this file gets checked into your Git repo if you work from multiple computers. This will ensure you never crosspost an entry more than once.

  • status

    Default: public

    The status your post is given when it is syndicated to Medium.

  • license

    Default: all-rights-reserved

    The license your post is given when it is syndicated to Medium.

  • text

    Default: <p><i>This article was originally posted <a href="{{ url }}" rel="canonical">on my own site</a>.</i></p>

    Optionally, provide a string to override the default text for the canonical link back to the source post. A {{ url }} placeholder should be provided to indicate where to put the canonical link, e.g., Some <a href="{{ url }}">link</a>

  • backdate

    Default: true

    Whether or not to use the original date & time of publication when crossposting.

A Note on Environment Variables

If you are having problems setting up Environment Variables, check out these guides:

Credits

Many thanks to Jeremy Keith for sharing his process (and PHP code) for getting this working on his own site.

More Repositories

1

jekyll-webmention_io

A Jekyll Plugin for rendering Webmentions via Webmention.io
Ruby
139
star
2

Adaptive-Web-Design-Project-Files

Project Files that go along with my book, Adaptive Web Design.
CSS
113
star
3

pwa-widgets

Playing with some ideas around widget definitions for PWAs
24
star
4

aaron-gustafson.com

My website
JavaScript
24
star
5

mactowindows.com

Resources for folks switching platforms from OS X & macOS to Windows
SCSS
13
star
6

jekyll-adaptive-image

An implementation of Adaptive Images with srcset and sizes using Googleโ€™s open image resizing service.
Ruby
10
star
7

pwa-summit-workshop

Demo code for my workshop at PWA Summit
HTML
7
star
8

talks-and-workshops

All of my talk and workshop slide decks
4
star
9

form-required-checkboxes

Web component that enables requirement rules for checkbox groups
JavaScript
4
star
10

jekyll-webmention_io-supplements

Supplementing what we get from webmention.io with feeds from other services
Ruby
4
star
11

adaptivewebdesign.info

Content of adaptivewebdesign.info
HTML
3
star
12

transform-visualizer

10k Apart Demo App
JavaScript
2
star
13

i-heart-cuttlefish

A little project for my Gymnasium class.
HTML
2
star
14

btconf-pwa-workshop

JavaScript
2
star
15

WindowsPWASuspension

Testing WWAHost suspension within Windows PWAs
JavaScript
1
star
16

WebUI

Progressive web UI components for modern and legacy browsers.
HTML
1
star
17

TestLaunchPWAFromURL

Testing how to redirect URLs into a PWA on Windows
HTML
1
star
18

WinDarkModePWADemo

Demoing Windows "Dark Mode" integration in a PWA
JavaScript
1
star
19

tipr.mobi

JavaScript
1
star
20

WindowsPWADownloadAttribute

Testing the download attribute within Windows PWAs
JavaScript
1
star
21

DocumentOutline.js

JavaScript for viewing the HTML document outline
JavaScript
1
star