Plugin: Publish to Web

My first plugin. Sometimes I've wanted to share a note, and I ended up putting it into evernote so I could do that easily.

This plugin will publish a note as a Github Gist [1]´

You can install it via the Joplin plugin system.

Why?

  • You can easily share notes and update without having Joplin Cloud share
  • The version history that github allows is better than the version diff (which must be enabled) that Joplin nativly supports
  • Allows readers to make comments on content you share
  • update a note instead of creating a new each time

Requirements

You need to create an auth token with gist scope here: github.com/settngs/tokens

Usage

After you have the token, click the github icon on your note

to do

  • upload referenced images

example

Change log


  1. Gists provide a simple way to share code snippets (in this case, notes) with others. Every gist is a Git repository, which means that it can be forked and cloned. If you are signed in to GitHub when you create a gist, the gist will be associated with your account and you will see it in your list of gists when you navigate to your gist home page. ↩︎

8 Likes

This is great, thanks!

One small suggestion (and I realize it may be too late) would be to name it either "Publish to Gist" or "Gist publsiher". Even having just installed it, when I went to try to find it on the plugin page I didn't think to look for it under "Joplin". Every plugin is for Joplin.

Anyway, this is a great plugin. Thanks so much for making it!

1 Like

I can remove the "Joplin" part if that helps. The reason I didn't call it something with Gist, is that I may expand it to publish to other services, like gitlab, or pastebin or whatever too.

4 Likes

Oh, cool. That's great to hear. Perhaps something like "Publish to Web".

Any way, great work. Thanks for taking the time to make this available.

2 Likes

I changed the name to "Publish to Web"

2 Likes

Hi there, where does the token go once we have it to enable the plugin ?

I'm seeing this at the moment : "HttpError: Requires authentication" which makes sense as I've not (as I don't know where) to put the token.

edit : I found it, I didn't associate "Publish" with "Publish to Web" in the options nav, though found it in the end :slight_smile:

2 Likes

Updated to version 1.1.0 which allows updating a gist. Persistent storage data for plugins that also get synced · Issue #8080 · laurent22/joplin · GitHub allowed this to happen.

2 Likes

Using it more a use-case that's very previous to me is revisions. Since the plugin updates the gist, you now get a nice git diff with differences from the different versions. It's a bit easier to deal with than the built-in Note History

1 Like

Hi, I need some help getting started.

I've been using Joplin on Windows, Android, Linux, ChromeOS for about a month now.

I'm currently a paid subscriber to Evernote, and if I switch over to Joplin I still want the ability to publish notes to the web and I came across your plugin which looks like the perfect solution for me only I can't get the plug in to work. The "Publish note" option under note is grayed out and there is no GitHub icon to click on to publish anything.

I created the token and gave it all permissions and I still can't get in to Joplin to publish anything to my Gist.

I may have done something wrong only I don't know what.

Any suggestions?

Thanks.

Leo.

There would be a GitHub icon on the note. You saved the api key in the plugin ?

Got it.

Turns out I needed to toggle the note editor. When I did, the icon appeared, and I was able to upload the data.

Thanks.

1 Like

Any chance you may someday support sharing entire notebooks?

like one gist, multiple files? or one gist per note? I mean, either way, sure. feel free to file an issue on github. I don't know when tho

I think @B0BIC is referring to selecting an actual notebook, rather than a single notebook.

I host my Joplin on my OneDrive and it would be awesome if somebody with developer skills that I certainly don't have could find a way to share a notebook with another person or place the same way that Joplin does it through their own cloud service just without having to use their cloud service.

I'm still very new to Joplin. I'm a long-term evernote user that is looking for an alternative to their rising prices.

I think @B0BIC is referring to selecting an actual notebook, rather than a single notebook.

I don't understand what you're thinking the difference is between the two things you described here

I am embedding images in my Notebook Note, and as I push to Gist (which I love) it seems to not migrate the image. Any advice? I figured out that I can change the image manually from being a PNG to being a markdown image with a data:uri, but it seems that Github doesn't present embedded data:uri images. Thoughts?

Sorry, @joeschmoe , I doubled up on notebook.

Should have read:I think @B0BIC is referring to selecting a whole notebook, rather than a single note.

oh right, yes that's how I read it. My question is around how to publish it. The two options are:

one gist with all the notes in it (probably the better option)
or multiple gists with one note in each

I am embedding images in my Notebook Note, and as I push to Gist (which I love) it seems to not migrate the image. Any advice?

It's in my todo list in the first post. Just didn't get around to it yet. partially because I need to write code to make a round trip to get the urls of the uploaded image paths and replace them in the original note. I also didn't have much of a personal use-case yet to do it, but I want to do it :wink:

just updated to be able to publish public gists instead of only private

3 Likes