ruhoh / ruhoh.js Goto Github PK
View Code? Open in Web Editor NEWclient-side implementation of ruhoh
client-side implementation of ruhoh
I use different config files, but any ruhoh template should compile in Desi without a problem.
If anyone uses it and their blog doesn't compile just the way it did before, I'd like to know so that I can fix it. I just started it two weeks ago, so there will be things that don't work as they do in ruhoh, but the goal is 100% compatibility with templates (not with config files - those are very easy to change anyway).
there's no documentation on what feedname should be in site.yml
and plugging my blog url coolaj86.ruhoh.com into feedburner gives me an error.
Is this not implemented yet? Or is there a non-standard path for the feed? What to do bro?
Here is the error i'm getting (after following the instructions here):
$ gem install ruhoh
Successfully installed ruhoh-0.2.1
1 gem installed
Installing ri documentation for ruhoh-0.2.1...
Installing RDoc documentation for ruhoh-0.2.1...
$ ruhoh help
/home/user/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- kramdown (LoadError)
from /home/user/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rvm/gems/ruby-1.9.3-p194/gems/ruhoh-0.2.1/lib/ruhoh/converters/converter.rb:1:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rvm/gems/ruby-1.9.3-p194/gems/ruhoh-0.2.1/lib/ruhoh.rb:27:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rvm/gems/ruby-1.9.3-p194/gems/ruhoh-0.2.1/bin/ruhoh:5:in `<top (required)>'
from /home/user/.rvm/gems/ruby-1.9.3-p194/bin/ruhoh:19:in `load'
from /home/user/.rvm/gems/ruby-1.9.3-p194/bin/ruhoh:19:in `<main>'
First of all, I am using Windows 7 and Ruby 1.9.3.
I followed the installation instructions for Ruhoh and created a new blog:
ruhoh new myblog
cd myblog
rackup -p 9292
The last command raises a RuntimeError
with the following stacktrace.
C:/Ruby/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
0 posts to process.
0 drafts to process.
←[32m6/6 pages processed.←[0m
C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/utils.rb:23:in `parse_file': File not found: D:/myblog/D:/myblog/_templates/themes/twitter/layouts/default.html (RuntimeError)
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/parsers/layouts.rb:11:in `block in generate'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/parsers/layouts.rb:9:in `each'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/parsers/layouts.rb:9:in `generate'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/db.rb:26:in `update'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/db.rb:39:in `block in update!'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/db.rb:38:in `each'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/db.rb:38:in `update!'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/ruhoh-0.0.3/lib/ruhoh/previewer.rb:18:in `initialize'
from D:/myblog/config.ru:10:in `new'
from D:/myblog/config.ru:10:in `block in <main>'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from D:/myblog/config.ru:1:in `new'
from D:/myblog/config.ru:1:in `<main>'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:137:in `start'
from C:/Ruby/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.1/bin/rackup:4:in `<top (required)>'
from C:/Ruby/ruby-1.9.3/bin/rackup:19:in `load'
from C:/Ruby/ruby-1.9.3/bin/rackup:19:in `<main>'
There is obviously a problem with the filepath (look at File not found: D:/myblog/D:/myblog/_templates/themes/twitter/layouts/default.html. I guess it is related to a Windows operating system withouth further investigation.
Links to ruhoh.rb repo. probably should be changed.
use ruhoh titleize to render following posts:
:title in yaml frontmatter filename score
nouvel année nouvel-anne.md good
sérieux è_é srieux-_.md bad
안녕하세요 .md wrong, in fact there isn't a file .md in _posts
三只熊 .md wrong in fact there isn't a file .md in _posts
غة يابانية .md wrongi n fact there isn't a file .md in _posts
My file system can handle all these files. Jekyll can render all of them correctly, though
In jekyll project, find . -type f
./30/غةيابانية/index.html
./31/绿色/index.html
./31/sérieux_è_é/index.html
./31/안녕하세요/index.html
So, would you please support filename in other languages?
sole number in :title are treated as ... a number! Should it be treated as string?
Because if it is treated as number, it conflicts with the following code
def self.permalink(post)
date = Date.parse(post['date'])
title = post['title'].downcase.gsub(' ', '-').gsub('.','')
format = case (post['permalink'] || Ruhoh.config.permalink)
ruhoh draft
---
title: 654321
date: '2012-05-31'
---
$ rackup -p 9393
/var/lib/gems/1.9.1/gems/ruhoh-0.3.0/lib/ruhoh/parsers/posts.rb:146:in permalink': undefined method
downcase' for 654321:Fixnum (NoMethodError)
either edit the title as
title: '654321'
title: 654321 is not treated as a number now
or change the source code.
This is an edge case but I think there are cases to use numbers as title.
According to the doc:
:title Title from the post’s filename
Given the post filename: 2009-04-29-green-milk-tea.md
(default) /2009/04/29/green-milk-tea.html
http://ruhoh.com/usage/configure/
I set the permanent link in _config.yml as:
permalink: /:title
I have a posts _posts/2009-09-25-12115.markdown
I am expecting the processed filename would be _complied/12115/index.html
instead I get _compiled/文章题目/index, where '文章题目' is the yaml frontmatter's title of 2009-09-25-12115.markdown
My questions are:
Is the doc wrong? What does :title stand for, the yaml :title in within the file or the filename.
Is there a way to use title in filename? Because in my case, the site is a writing competition for middle school students, so a lot of posts have same :title. And this makes newer one overwrite the older one. So when I proceed a sites with 2000 posts, the final files I get in the _compile folder is less than 20.
I see there is a ruhoh titleize command which extracts the title from post and use it as filename. But in my case I want to set the title in filename manually.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.