pravj / Harry

jekyll plugin to have :smileys: in your blogs
6 stars 0 forks source link

can't run it, getting error #7

Open Jiraiyah opened 9 years ago

Jiraiyah commented 9 years ago

Hi As soon as i add Harry to _plugin folder and add the passing to content i get this error and the serve don't start : C:\Users\Alireza\Desktop\WWW>jekyll serve Configuration file: C:/Users/Alireza/Desktop/WWW/_config.yml C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' : C:/Users/Alireza/Desktop/WWW/_plugins/harry.rb:5: syntax error, unexpected '<' (SyntaxError) <!DOCTYPE html> ^ C:/Users/Alireza/Desktop/WWW/_plugins/harry.rb:6: syntax error, unexpected '<'

^ C:/Users/Alireza/Desktop/WWW/_plugins/harry.rb:6: syntax error, unexpected keywo rd_class, expecting end-of-input ^ from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 :in`require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/plugin_manager.rb:74:in `block (2 levels) in require_plugin_files' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/plugin_manager.rb:73:in`each' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/plugin_manager.rb:73:in `block in require_plugin_files' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/plugin_manager.rb:72:in`each' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/plugin_manager.rb:72:in `require_plugin_files' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/plugin_manager.rb:18:in`conscientious_require' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/site.rb:79:in `setup' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/site.rb:41:in`initialize' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/commands/build.rb:29:in `new' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/commands/build.rb:29:in`process' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in`call' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in`each' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in`go' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program' from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.5.2/bin/jekyll:20:in`' from C:/Ruby21-x64/bin/jekyll:23:in `load' from C:/Ruby21-x64/bin/jekyll:23:in`
' C:\Users\Alireza\Desktop\WWW> I'm sure you noticed that I'm running jekyl in windows but that should not be the problem here, Also, I'm using bootstrap's Hooligan template but again I don't think that is the problem, please help?
Jiraiyah commented 9 years ago

sorry it is solved but now take a look at this http://jiraiyah.bitbucket.org/blog/2014/12/26/scala-to-java/ the page has only one emoji but as you see some other stuff from the plugin are injected into the page that should not be there or it seems it is missing part of tags, not html coder myself so i can't figure that one out

pravj commented 9 years ago

Hey, @Jiraiyah

Can I see where is the markdown files for your blog, I checked your Bitbucket repo but looks like the .md files are not there.

I admit that the .html file for that blog entry is having messed up html tags, is this the result of Harry itself? I tried and getting right results so can you provide information that I asked?

Jiraiyah commented 9 years ago

yah it was harry, changed it a bit, here is what worked for me now :

if animated '<img src="/public/smileys/animated/'+smiley+'.gif"; height="20px"; width="20px"; style="display:inline;margin:0;vertical-align:middle"/>' else '<img src="/public/smileys/general/'+smiley+'.png"; height="20px"; width="20px"; style="display:inline;margin:0;vertical-align:middle"/>' end

that is line 21 forward, I removed a text field and used semi colons and now it shows up correctly

Jiraiyah commented 9 years ago

dame, trying again lol if animated '<_img _src="/public/smileys/animated/'+smiley+'.gif"; _height="20px"; width="20px"; _style="display:inline;margin:0;vertical-align:middle"/>' else '<_img src="/public/smileys/general/'+smiley+'.png"; _height="20px"; width="20px"; ****style="display:inline;margin:0;vertical-align:middle"/>' end

pravj commented 9 years ago

Cool, actually right now I don't have Jekyll installed on my system, so I tried running the main ruby script only and It was generating right img tag string.

Make sure this is not related to the windows environment you're using and make a pull request if you find everything fine. :santa: