Skip to content

Dynamically embed medium articles previews in Webflow, Shopify, Square Space or wherever TF you want! πŸ‘

Notifications You must be signed in to change notification settings

paulpierre/webflow-medium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 

Repository files navigation

β–ˆβ–‘β–‘β–‘β–ˆ β–ˆβ–€β–€ β–ˆβ–€β–€β–„ β–ˆβ–€β–€ β–ˆβ–‘β–‘ β–ˆβ–€β–€β–ˆ β–ˆβ–‘β–‘β–‘β–ˆ β–‘β–‘ β–ˆβ–€β–„β–€β–ˆ β–ˆβ–€β–€ β–ˆβ–€β–€β–„ β–‘β–€β–‘ β–ˆβ–‘β–‘β–ˆ β–ˆβ–€β–„β–€β–ˆ β–‘ β–‘β–‘β–€ β–ˆβ–€β–€ 
β–ˆβ–„β–ˆβ–„β–ˆ β–ˆβ–€β–€ β–ˆβ–€β–€β–„ β–ˆβ–€β–€ β–ˆβ–‘β–‘ β–ˆβ–‘β–‘β–ˆ β–ˆβ–„β–ˆβ–„β–ˆ β–€β–€ β–ˆβ–‘β–€β–‘β–ˆ β–ˆβ–€β–€ β–ˆβ–‘β–‘β–ˆ β–€β–ˆβ–€ β–ˆβ–‘β–‘β–ˆ β–ˆβ–‘β–€β–‘β–ˆ β–„ β–‘β–‘β–ˆ β–€β–€β–ˆ 
β–‘β–€β–‘β–€β–‘ β–€β–€β–€ β–€β–€β–€β–‘ β–€β–‘β–‘ β–€β–€β–€ β–€β–€β–€β–€ β–‘β–€β–‘β–€β–‘ β–‘β–‘ β–€β–‘β–‘β–‘β–€ β–€β–€β–€ β–€β–€β–€β–‘ β–€β–€β–€ β–‘β–€β–€β–€ β–€β–‘β–‘β–‘β–€ β–ˆ β–ˆβ–„β–ˆ β–€β–€β–€

webflow-medium.js - Dynamically embed medium articles in Webflow πŸ‘


About

webflow-medium is a script you can embed onto your hosted website like Webflow, Shopify, Square Space that allows you to directly inject your article meta data directly onto the page.

by @paulpierre, a blockchain developer @ https://www.conductiveresearch.com

join us we're hiring πŸ§‘β€πŸ”¬πŸ΄β€β˜ οΈπŸ‘©β€πŸ”¬

Features

  • πŸ΄β€β˜ οΈ Get around Medium.com from accessing your own content! Embed your articles
  • πŸ”’ Preserves the style of your theme, just swaps content
  • βš™οΈ Fill in CSS query selectors, and the rest is done
  • πŸ‘οΈ Calculates amount of minutes it takes to read!
  • ⚠️ Set the maximum length of the title and description
  • πŸ–ΌοΈ Set a default image if no thumbnail is found

Metadata

  • Article title
  • Article description / preview
  • Article # of minutes to read
  • Article link

Get started

  1. Open webflow-medium.js and edit the section beneath // Configuration values
  2. Set your Medium.com users name under USERNAME
  3. Makes sure you setup a dummy layout on Webflow for the medium articles
  4. Configure your CSS selectors, embed script in Webflow and rock and roll!

How it works

Currently Medium does not really provide get APIs for your content or embed your medium articles in any meaningful way. Currently embedding results in styling the embed in Medium's style guide. This is silly, that's why I'm here.

  • Every medium has an RSS feed accessible via https://medium.com/feed/@yourusername
  • I simply pass this to a free RSS to JSON service
  • Loop and inject through the selectors .. very basic πŸ’©

TODO:

  • Make certain Medium metadata optional
  • Limit description by word length rather than character length
  • Make images a >1 selector rather than individual. This was done bc of the particular site I was working with. Too lazy.
  • Create a function to directly parse the XHTML rather than relying on rss2json.com API

If you want additional features, find bugs, just submit an issue

Interested in blockchain and dApp development. Were hiring and looking for pirates πŸ΄β€β˜ οΈ, https://www.conductiveresearch.com

Give this a ⭐ above ☝️ and me a follow on Twitter if you liked this πŸ‘

About

Dynamically embed medium articles previews in Webflow, Shopify, Square Space or wherever TF you want! πŸ‘

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published