cyjake / darko

🐰A Node.js port of Jekyll
82 stars 16 forks source link

Comma in URLs #5

Closed sahat closed 10 years ago

sahat commented 10 years ago

For some reason, Darko inserts comma in every URL. I've tried changing baseUrl and url yml properties with no luck. There might be a bug somewhere in the code. I am trying to find the place where you parse URLs, but don't know where it is located.

<link rel="canonical" href="http://yoursite.com,/,/">

<link rel="stylesheet" href="/,/css/main.css">
sahat commented 10 years ago

Found the "problem":

Default skeleton generated by Jekyll is this url:

<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">

After removing prepend comma is no longer being inserted. I still think this should be fixed to support prepend which I assume was added in Jekyll 2.0 or was never considered to be implemented.

cyjake commented 10 years ago

Ah I believe this filter was not around when I implemented darko. I'll see to it this weekend. Thanks for the reminding.

cyjake commented 10 years ago

My mistake. prepend is one of the standard filters that liquid template supports but liquid-node does not yet.

sahat commented 10 years ago

Ok thanks @dotnil . I will close this issue until further notice when liquid-node adds a support for prepend filter.

cyjake commented 10 years ago

I can provide these filters no matter liquid-node supports them or not, via https://github.com/dotnil/darko/blob/master/lib/liquid/index.coffee

There is an issue of liquid-node open regarding standard filters. There may or may not be any progress yet.

cyjake commented 10 years ago

@sahat It seems liquid-node does support prepend filter. It's in 0.3.x versions. I've update darko accordingly but there's some bug introduced by this change. I'll release a new version of darko as soon as I fix these problems.

sahat commented 10 years ago

Thanks for keeping me posted on this Jake! Look forward to the new release. Hopefully I could replace Jekyll as a hard dependency for my app and use node.js modules for everything.

On Sun, Jun 22, 2014 at 1:16 AM, Jake Chen notifications@github.com wrote:

@sahat https://github.com/sahat It seems liquid-node does support prepend filter. It's in 0.3.x versions. I've update darko accordingly but there's some bug introduced by this change. I'll release a new version of darko as soon as I fix these problems.

— Reply to this email directly or view it on GitHub https://github.com/dotnil/darko/issues/5#issuecomment-46772805.

cyjake commented 10 years ago

@sahat The problem is now fixed. All standard filters have been ported to liquid-node.

cyjake commented 10 years ago

https://github.com/sirlantis/liquid-node/pull/23