Re: [hakyll] empty url field

34 views
Skip to first unread message

Jasper Van der Jeugt

unread,
Feb 22, 2013, 10:32:12 AM2/22/13
to hak...@googlegroups.com
You're using two versions for posts, and one version has no routing
information associated. This is not a problem on it's own, but if you
load the version without routing information, `$url$` will not be set.

While it's fixable using two versions, I think snapshots are a better
fit here. You can find a tutorial on shapshots here:
http://jaspervdj.be/hakyll/tutorials/05-snapshots-feeds.html

I sent you a pull request which fixes the issue:
https://github.com/samplecount/samplecount-blog/pull/1

Peace,
Jasper

On Fri, Feb 22, 2013 at 11:01 AM, Stefan Kersten <kaosko...@gmail.com> wrote:
> hi,
>
> [resending from the webinterface, probably my mail to the list landed in the
> spam folder]
>
> i'd like to implement a simple blog where the content of a number of posts
> is shown on the index page with links to each post. front page posts and
> individual post pages need to use a different template (individual post
> pages allow to post comments). i got quite far with the help of a recent
> thread on this list [1], but there seems to be a problem with my code [2]:
> the url field in the index post template is empty; at first i thought it was
> a name clash and added postUrl to the post context, to no avail.
>
> any ideas what's going wrong?
>
> thanks for any pointers,
>
> sk
>
> [1] https://groups.google.com/forum/#!topic/hakyll/OZpggt3SaBw
>
> [2] https://github.com/samplecount/samplecount-blog/blob/master/site.hs
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "hakyll" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hakyll+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Stefan Kersten

unread,
Feb 22, 2013, 11:55:07 AM2/22/13
to hak...@googlegroups.com
hi jasper,

On 22 Feb 2013, at 16:32, Jasper Van der Jeugt <m...@jaspervdj.be> wrote:
> You're using two versions for posts, and one version has no routing
> information associated. This is not a problem on it's own, but if you
> load the version without routing information, `$url$` will not be set.
>
> While it's fixable using two versions, I think snapshots are a better
> fit here. You can find a tutorial on shapshots here:
> http://jaspervdj.be/hakyll/tutorials/05-snapshots-feeds.html
>
> I sent you a pull request which fixes the issue:
> https://github.com/samplecount/samplecount-blog/pull/1

great, thanks, works beautifully!

sk

Stefan Kersten

unread,
Feb 23, 2013, 2:37:37 PM2/23/13
to hak...@googlegroups.com
On 22/02/2013, at 16:32, Jasper Van der Jeugt <m...@jaspervdj.be> wrote:
> You're using two versions for posts, and one version has no routing
> information associated. This is not a problem on it's own, but if you
> load the version without routing information, `$url$` will not be set.

btw and fwiw i think it might be helpful to make this an error (with reference to the missing routing info) rather than silently expand the empty string.

sk

Reply all
Reply to author
Forward
0 new messages