jumbyl
Post to Tumblr with static files, like Jekyll
Install
npm install jumbyl -g
Jumbyl is a command-line tool. Installing it globally will add the jumbyl
command.
Setup
- Go to www.tumblr.com/oauth/apps
- Click + Register application
Use these values for the jumbyl application. You can leave all the others blank.
Application Name: | jumbyl |
---|---|
Administrative contact email: | your@email.com |
Default callback URL: | http://localhost:8080/complete |
_jumbyl.yml
Once you Save changes, you'll need to create a new config file _jumbyl.yml
in your local project folder. Set base_hostname
and copy the OAuth consumer key and OAuth consumer secret into _jumbyl.yml
.
# these keys will not work, copy/paste in your ownbase_hostname: your_blog.tumblr.com # or your_blog.comconsumer_key: UveNAMmenYF1Zivd6ahUJWKNy2gHl6PC9lMthT7mwjT8Ujf2NVconsumer_secret: dLfg7DB2ZU5eVx3xyL3DltxtOBchmvQReBIn9HYB3GmXsgYLaQ
Probably a good idea to add _jumbyl.yml
to .gitignore
.
From the command line, navigate to your local project folder and authorize
jumbyl auth
Once authorized, you can now post to your Tumblr.
Post
To post to Tumblr, specify a file with jumbyl
jumbyl _posts/my-post.md
After successfully posting, jumbyl will add the tumblr post id
to the file's YAML Front Matter.
To edit a post, the file will need an id
parameter, so you can use the same command.
Parameters
Parameters for your Tumblr post can be set with YAML Front Matter.
Here's a text post:
---
title: Favorite Ninja Turtles
tags: [ turtles, ninjas, probably Leonardo ]
format: markdown
---
+ **Leonardo** duh
+ Sometimes _Raphael_, when's he's not emo
Here's a link post:
---
title: TMNTPedia
type: link
tags: [ knowledge, wiki ]
url: http://tmnt.wikia.com/
---
Seriously, get schooled.
The content of the post will be set to the appropriate parameter for the type of post.
text | body |
---|---|
link | description |
chat | conversation |
quote | quote |
photo | caption |
audio | caption |
video | caption |
Additionally, the format of the post will be read from the post's file extention. Posts that use .markdown
.md
.mkdn
.mdown
, will be set as format: 'markdown'
.
Jekyll
Jumbyl pairs up nicely with Jekyll.
For link posts, you can use _url
in the YAML Front Matter, so it does not conflict with Jekyll's template data like post.url
.
---
title: TMNTPedia
type: link
# _url, so no clonflict with Jekyll's post.url
_url: http://tmnt.wikia.com/
---
Seriously, get schooled.