Code Monkey home page Code Monkey logo

pagoda's Introduction

Pagoda Build Status Code Climate

Analytics

http://f.cl.ly/items/3v0Y3q2O461C3K0A221Y/pagoda.png

Zen like blog editor for your Jekyll blog, heavily inspired by Svbtle and Obtvse.

Screenshots

Dashboard http://cl.ly/image/2u0L362v1L1N/Home.png

Editor http://cl.ly/image/1u2w2l2F0w1e/Pale%20Blue%20Dot.png

Fullscreen editing http://cl.ly/image/0b3Y101Y3g0A/Screen%20Shot%202013-05-14%20at%2011.57.45%20PM.png

Edit YAML Data

http://cl.ly/image/2P342Q1W0q1H/Screen%20Shot%202013-06-09%20at%203.13.13%20PM.png

Mobile Dashboard and Editing

......

Install

Installing locally

Two commands, one for installing, another for running.

  gem install pagoda-jekyll
  pagoda .

http://cl.ly/image/1B3Z1Q3I1g37/pagoda-install.png

Running it on Heroku

Requirements:

  1. Heroku
  2. Git
  3. Your Jekyll Repo
git clone https://github.com/alagu/pagoda
cd pagoda
heroku create
bundle exec rake heroku

Default YAML

Each post created with pagoda will have a default yaml data. To modify it, create a _default.yml in your jekyll repository and commit it.

Deploying on your own server

I use basic http authentication in real world use. I've deployed through nginx + unicorn. There could be easier deployment than this.

This is still not well organized, but the setup works.

Create sock and pid folders

mkdir -p tmp/pids
mkdir tmp/sock

Your unicorn configuration (unicorn.rb):

pid "./tmp/pids/blog-admin.pid"
listen "unix:./tmp/sock/blog-admin.sock"
ENV['blog'] = '/path/to/your/jekyll/blog'

Script to start Unicorn (start.sh):

cd /path/to/pagoda
rvm use 1.9.3
unicorn -c unicorn.rb  -D

Note: This should be run as bash --login start.sh

Create htpasswd file for authentication

htpasswd -c /path/to/httpasswd/file alagu
New password: <enterpasswd>
Re-type new password: <re-enterpasswd>
Adding password for user alagu

Nginx configuration

myblog.com shows the generated blog and myblog.com/admin pops up a http authentication for your admin.

upstream unicorn_server {
   server unix:/path/to/tmp/sock/blog-admin.sock;
}

server {
        server_name myblog.com;

        listen 80;

        location / {
           root  /path/to/your/jekyll/blog/_site/;
        }

        location /admin {
                auth_basic "Restricted";
                auth_basic_user_file /path/to/htpasswd/file;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_redirect off;
                proxy_pass http://unicorn_server;
        }
}

FAQ/Bugs

I get ArgumentError - invalid byte sequence in US-ASCII

Set localte to UTF-8

export LC_ALL=en_US.UTF-8

pagoda's People

Contributors

alagu avatar chrisdl avatar mibamur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pagoda's Issues

Need to be able to specify path to load assets

Currently, I host my blog at /blog/, and want to put pagoda on at /blog/admin/. I've managed to get Apache working with Unicorn to get /blog/admin/ working. However, all of the assets still load from /admin. I changed config.ru to make /blog/admin the entry point and adjusted my apache config to proxy to /blog/admin/.

Maybe the ability to set where to load assets from?

Yaml editor

It could be great to have the possibilities to modify the yaml information of the post in pagoda.

For example, I write a jekyll website for a friends who can list picture or youtube's video id and the views is generated.

With that kind of feature, she can left the editor and write it in a single place. ๐Ÿ’Œ

Pages

I was wondering if there were any plans to bring page editing to this project? From the demo it seems there is only post editing.

Better Editor

The editor needs to be able to render images and do basic level of markdown within the editor.

The Medium's editor is brilliant. It should be close to that.

Problems with existing Markdown editor

  • Split screen sucks. One screen to preview and another screen to edit. Redundant content.
  • You need to remember Markdown syntax.

How I wish the editor would be

  • The line in which you are editing, you can write in Markdown. Once you move to the next line, the previously edited line should automatically get converted to preview (or) rendered mode.
  • When you move your cursor to a specific line, it should automatically be in markdown syntax mode.
  • Markdown syntax is fairly simple - but it requires some amount of help around to remember. Still not sure of whether an iconbox is required here or some other way to make me remember syntax.

Add demo

How about deploying a demo to Heroku?

Default yaml structure

Thanks for the yaml editor that you made. This is so cool ! ๐Ÿ‘

Next step is to let us configure the default structure of these.
Like a file that have all values we need in our page to work properly and let the end-user change them with the needed values for the content that he write.

I think of that for poeple who I helped them to build their website (like portfolio) who are designer, not programmer. They can give youtube, vimeo's id or picture file's name or whatever in the yaml header before the explanation of the project. Then the page is built with the content that the user specify.

It could be great for us to create a yaml structure for our users.

What do you think about it ?

Conflicting with pagodabox

Apparently a while back I was testing out PagodaBox and I must have installed their CLI tool which is name "pagoda".

I am having other issues getting this up and running but I believe most to be due to a problem with my Ruby/Gem. I just thought you might want to know that command is being used elsewhere.

NoMethodError at / undefined method `filter_entries' ...

Hi everyone! I'm trying to use Pagoda but everytime i launch it in my folder (pagoda .) and try to access to localhost:4567 i have the error "NoMethodError at / undefined method `filter_entries' ...."
I've tried to uninstall and install again, even upgrading jekyll, but nothing changes.

Could anyone help me?

Separating into API and Client

Not really an issue but I've just started learning rails and I've been trying to separate this project into a client that doesn't use Sinatra and a json API for a few days now, and I'm getting internal server errors when I try to access /save-post by doing this:

uri = URI('http://hidden-caverns-8480.herokuapp.com/admin/save-post.json')
req = Net::HTTP::Post.new(uri.path)
req.basic_auth username, password
data = {
"method" => "put",
"post" => { "title" => "mytitleeee", "name" => "gjh", "content" => "hiiii" },
"commit" => "Save",
"ajax" => "true"
}.to_json
req.content_type = 'application/json'
req.body = data
http = Net::HTTP.new(uri.host, uri.port)
@myResponse = http.start {|http| http.request(req) }

Any advice? Thanks!

Fix Deploy

Deployment is still messed up, heroku install is Ok, but needs better way to drive adoption.

  1. Hosted Version
    1. Bitbucket
    2. Github
    3. Custom Domain
  2. Localhost/From Source
  3. Heroku
  4. EC2 Image
  5. Docker Image

NoMethodError at /

Sorry about posting it here, but I'm not that familiar with rails to fix it myself.

Running Ruby v1.9.3-preview1.

/home/nemo/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require': iconv will be deprecated in the future, use String#encode instead.
[2013-06-07 15:14:24] INFO  WEBrick 1.3.1
[2013-06-07 15:14:24] INFO  ruby 1.9.3 (2011-07-31) [x86_64-linux]
== Sinatra/1.4.2 has taken the stage on 4567 for development with backup from WEBrick
[2013-06-07 15:14:24] INFO  WEBrick::HTTPServer#start: pid=30898 port=4567
Configuration from ./_config.yml
NoMethodError - undefined method `name' for <Post: /blog/2009/11/19/welcome>:Jekyll::Post:
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/pagoda-jekyll-0.0.9/lib/pagoda/helper.rb:49:in `block in posts_template_data'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/pagoda-jekyll-0.0.9/lib/pagoda/helper.rb:46:in `map'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/pagoda-jekyll-0.0.9/lib/pagoda/helper.rb:46:in `posts_template_data'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/pagoda-jekyll-0.0.9/lib/pagoda/app.rb:76:in `block in <class:App>'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1415:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1415:in `block in compile!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `[]'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `block (3 levels) in route!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:960:in `route_eval'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `block (2 levels) in route!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:981:in `block in process_route'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:979:in `catch'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:979:in `process_route'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:943:in `block in route!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:942:in `each'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:942:in `route!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1053:in `block in dispatch!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `block in invoke'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `catch'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `invoke'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1050:in `dispatch!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:878:in `block in call!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `block in invoke'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `catch'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `invoke'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:878:in `call!'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:864:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/showexceptions.rb:21:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:172:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1947:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1610:in `block in call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1693:in `synchronize'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/sinatra-1.4.2/lib/sinatra/base.rb:1610:in `call'
        /home/nemo/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
        /home/nemo/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
        /home/nemo/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
        /home/nemo/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
localhost - - [07/Jun/2013:15:14:46 IST] "GET / HTTP/1.1" 500 132083

Undefined method `published'

Hello.

NoMethodError at /
undefined method `published' for <Post: /2014/07/07/kjkkjkjkjk>:Jekyll::Post
file: jekyll-mod.rb
location: block in read_drafts
line: 26
 ~/p/ruby/tst/ gem list | grep jekyll
jekyll (2.1.0)
jekyll-coffeescript (1.0.0)
jekyll-gist (1.1.0)
jekyll-paginate (1.0.0)
jekyll-sass-converter (1.0.0)
jekyll-watch (1.0.0)
pagoda-jekyll (0.0.11)
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]

Install on Openshift?

I was wondering if its possible to install pagoda on Openshift. I guess the normal procedure should work. I will try to install it and if successful, post instructions.

If someone has already done this, kindly share the procedure.

Thanks!

Editor height is too big for my screen

Hi,

I have a really small screen estate (1280*800) and because of that resolution I've been facing a little bug.
When I edit posts that are long to fill the height of the editor, the bottom bar goes over the content, which make it a little hard to edit.

An image is more easy to understand...

capture decran 2013-06-06 a 05 12 02

BTW I saw Pagoda on OTW this week and been testing it yesterday. It's neat, loving it !
Thanks

Pagoda not reading from _drafts folder

I ran 'gem install pagoda-jekyll' in my local jekyll site directory. I ran 'pagoda .' I bring up 'http://localhost:4567/' in my browser and everything is running fine except pagoda is not reading any of my draft files stored in the _drafts folder. Am I missing something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.