cloudhead / toto

the 10 second blog-engine for hackers
MIT License
1.49k stars 244 forks source link

Store blog entry files in Dropbox #109

Open mikekellyio opened 12 years ago

mikekellyio commented 12 years ago

I found Calepin, a service that serves up Markdown formatted files stored in a Dropbox folder. But it has some significant drawbacks that our beloved toto solves, namely that toto is self-hostable, and themable.

Storing my my blog entries in a Dropbox folder would make it much easier to publish entries when I'm on the go and my access to a terminal for git pushes is limited.

http://zerodistraction.com/blog/2011/11/24/calepin-a-dropbox-powered-blogging-tool.html

ixti commented 12 years ago

What is the problem to keep articles in Dropbox folder?

mikekellyio commented 12 years ago

none, I was filing a feature request to pull from a dropbox folder instead of the articles directory within dorothy. If I can scrape the spare time together to implement soon I shall, but I thought I would at least file it in case someone else had thoughts.

ixti commented 12 years ago

Well, that was what I was basically asking about. Within toto config of dorothy, you can set any path to your articles - it can be absolute one, so you can point to "fetch" articles from your DropBox directory:

require 'toto'
Toto::Paths[:articles] = '/home/ixti/Dropbox/blog'

toto = Toto::Server.new do
  set :author, "Aleksey V. Zapparov AKA ixti"
  set :title, "ixti's personal sandbox"
  set :url, "http://blog.ixti.net"
  set :markdown, [:gh_blockcode, :strikethrough, :fenced_code, :no_intraemphasis]
  set :disqus, "ixti"
  set :cache, 24*60*60
  set :error, lambda { |code|
    code = 500 unless [400, 404, 500].include? code.to_i
    IO.read "public/#{code}.html"
  }
end
mikekellyio commented 12 years ago

except when I'm hosted on Heroku, my Dropbox directory isn't mounted there. My thinking was having toto pull using the Dropbox api so that i could update blog articles without needing to do the push with git. Similiar to issue #108, just on dropbox instead of Github.

ixti commented 12 years ago

Hmm... Interesting idea, but to e honest git-based storage seems more interesting for me :))